summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-06-13 09:30:05 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-06-23 08:22:25 -0400
commitcca07b00a56d6ddd339e457dfd1a229222b9acf5 (patch)
tree15cc5be2e90930f76e6f2188bd825c216f9810fa /net/mac80211/mlme.c
parent59f48fe22fe817df1ced42dee28b31de88b478b6 (diff)
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/mlme.c')
-rw-r--r--net/mac80211/mlme.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 3345401be1b3..1ab1884eddbf 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -983,7 +983,8 @@ static void ieee80211_chswitch_work(struct work_struct *work)
983 if (!ieee80211_csa_needs_block_tx(local)) 983 if (!ieee80211_csa_needs_block_tx(local))
984 ieee80211_wake_queues_by_reason(&local->hw, 984 ieee80211_wake_queues_by_reason(&local->hw,
985 IEEE80211_MAX_QUEUE_MAP, 985 IEEE80211_MAX_QUEUE_MAP,
986 IEEE80211_QUEUE_STOP_REASON_CSA); 986 IEEE80211_QUEUE_STOP_REASON_CSA,
987 false);
987 mutex_unlock(&local->mtx); 988 mutex_unlock(&local->mtx);
988 989
989 ifmgd->flags &= ~IEEE80211_STA_CSA_RECEIVED; 990 ifmgd->flags &= ~IEEE80211_STA_CSA_RECEIVED;
@@ -1115,7 +1116,8 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
1115 if (sdata->csa_block_tx) 1116 if (sdata->csa_block_tx)
1116 ieee80211_stop_queues_by_reason(&local->hw, 1117 ieee80211_stop_queues_by_reason(&local->hw,
1117 IEEE80211_MAX_QUEUE_MAP, 1118 IEEE80211_MAX_QUEUE_MAP,
1118 IEEE80211_QUEUE_STOP_REASON_CSA); 1119 IEEE80211_QUEUE_STOP_REASON_CSA,
1120 false);
1119 mutex_unlock(&local->mtx); 1121 mutex_unlock(&local->mtx);
1120 1122
1121 if (local->ops->channel_switch) { 1123 if (local->ops->channel_switch) {
@@ -1385,7 +1387,8 @@ void ieee80211_dynamic_ps_disable_work(struct work_struct *work)
1385 1387
1386 ieee80211_wake_queues_by_reason(&local->hw, 1388 ieee80211_wake_queues_by_reason(&local->hw,
1387 IEEE80211_MAX_QUEUE_MAP, 1389 IEEE80211_MAX_QUEUE_MAP,
1388 IEEE80211_QUEUE_STOP_REASON_PS); 1390 IEEE80211_QUEUE_STOP_REASON_PS,
1391 false);
1389} 1392}
1390 1393
1391void ieee80211_dynamic_ps_enable_work(struct work_struct *work) 1394void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
@@ -1833,7 +1836,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1833 if (!ieee80211_csa_needs_block_tx(local)) 1836 if (!ieee80211_csa_needs_block_tx(local))
1834 ieee80211_wake_queues_by_reason(&local->hw, 1837 ieee80211_wake_queues_by_reason(&local->hw,
1835 IEEE80211_MAX_QUEUE_MAP, 1838 IEEE80211_MAX_QUEUE_MAP,
1836 IEEE80211_QUEUE_STOP_REASON_CSA); 1839 IEEE80211_QUEUE_STOP_REASON_CSA,
1840 false);
1837 mutex_unlock(&local->mtx); 1841 mutex_unlock(&local->mtx);
1838 1842
1839 sdata->encrypt_headroom = IEEE80211_ENCRYPT_HEADROOM; 1843 sdata->encrypt_headroom = IEEE80211_ENCRYPT_HEADROOM;
@@ -2082,7 +2086,8 @@ static void __ieee80211_disconnect(struct ieee80211_sub_if_data *sdata)
2082 if (!ieee80211_csa_needs_block_tx(local)) 2086 if (!ieee80211_csa_needs_block_tx(local))
2083 ieee80211_wake_queues_by_reason(&local->hw, 2087 ieee80211_wake_queues_by_reason(&local->hw,
2084 IEEE80211_MAX_QUEUE_MAP, 2088 IEEE80211_MAX_QUEUE_MAP,
2085 IEEE80211_QUEUE_STOP_REASON_CSA); 2089 IEEE80211_QUEUE_STOP_REASON_CSA,
2090 false);
2086 mutex_unlock(&local->mtx); 2091 mutex_unlock(&local->mtx);
2087 2092
2088 cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf, 2093 cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf,