summaryrefslogtreecommitdiffstats
path: root/net/mac80211/pm.c
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-06-13 16:30:05 +0300
committerJohannes Berg <johannes.berg@intel.com>2014-06-23 14:22:25 +0200
commitcca07b00a56d6ddd339e457dfd1a229222b9acf5 (patch)
tree15cc5be2e90930f76e6f2188bd825c216f9810fa /net/mac80211/pm.c
parent59f48fe22fe817df1ced42dee28b31de88b478b6 (diff)
downloadlinux-cca07b00a56d6ddd339e457dfd1a229222b9acf5.tar.gz
linux-cca07b00a56d6ddd339e457dfd1a229222b9acf5.tar.xz
mac80211: introduce refcount for queue_stop_reasons
Sometimes different vifs may be stopping the queues for the same reason (e.g. when several interfaces are performing a channel switch). Instead of using a bitmask for the reasons, use an integer that holds a refcount instead. In order to keep it backwards compatible, introduce a boolean in some functions that tell us whether the queue stopping should be refcounted or not. For now, use not refcounted for all calls to keep it functionally the same as before. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r--net/mac80211/pm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index d478b880a0af..4c5192e0d66c 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -35,7 +35,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
ieee80211_stop_queues_by_reason(hw,
IEEE80211_MAX_QUEUE_MAP,
- IEEE80211_QUEUE_STOP_REASON_SUSPEND);
+ IEEE80211_QUEUE_STOP_REASON_SUSPEND,
+ false);
/* flush out all packets */
synchronize_net();
@@ -74,7 +75,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
}
ieee80211_wake_queues_by_reason(hw,
IEEE80211_MAX_QUEUE_MAP,
- IEEE80211_QUEUE_STOP_REASON_SUSPEND);
+ IEEE80211_QUEUE_STOP_REASON_SUSPEND,
+ false);
return err;
} else if (err > 0) {
WARN_ON(err != 1);