summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-06-13 09:30:07 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-06-23 08:22:29 -0400
commita46992b441f097a971cca39f49d07a0d16a1c0d8 (patch)
treed80aacded124a3add8691ada27deb47ce6722ae0 /net/mac80211/mlme.c
parent26da23b6950cd1aaae86caa541eb4befc9e96e1d (diff)
mac80211: stop only the queues assigned to the vif during channel switch
Instead of stopping all the hardware queues during channel switch, which is especially bad when we have large CSA counts, stop only the queues that are assigned to the vif that is performing the channel switch. Additionally, check for (sdata->csa_block_tx) instead of calling ieee80211_csa_needs_block_tx(), which can now be removed. 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.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1ab1884eddbf..eccc8492a59c 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -980,11 +980,11 @@ static void ieee80211_chswitch_work(struct work_struct *work)
980 mutex_lock(&local->mtx); 980 mutex_lock(&local->mtx);
981 sdata->vif.csa_active = false; 981 sdata->vif.csa_active = false;
982 /* XXX: wait for a beacon first? */ 982 /* XXX: wait for a beacon first? */
983 if (!ieee80211_csa_needs_block_tx(local)) 983 if (sdata->csa_block_tx) {
984 ieee80211_wake_queues_by_reason(&local->hw, 984 ieee80211_wake_vif_queues(local, sdata,
985 IEEE80211_MAX_QUEUE_MAP, 985 IEEE80211_QUEUE_STOP_REASON_CSA);
986 IEEE80211_QUEUE_STOP_REASON_CSA, 986 sdata->csa_block_tx = false;
987 false); 987 }
988 mutex_unlock(&local->mtx); 988 mutex_unlock(&local->mtx);
989 989
990 ifmgd->flags &= ~IEEE80211_STA_CSA_RECEIVED; 990 ifmgd->flags &= ~IEEE80211_STA_CSA_RECEIVED;
@@ -1114,10 +1114,8 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
1114 sdata->csa_block_tx = csa_ie.mode; 1114 sdata->csa_block_tx = csa_ie.mode;
1115 1115
1116 if (sdata->csa_block_tx) 1116 if (sdata->csa_block_tx)
1117 ieee80211_stop_queues_by_reason(&local->hw, 1117 ieee80211_stop_vif_queues(local, sdata,
1118 IEEE80211_MAX_QUEUE_MAP, 1118 IEEE80211_QUEUE_STOP_REASON_CSA);
1119 IEEE80211_QUEUE_STOP_REASON_CSA,
1120 false);
1121 mutex_unlock(&local->mtx); 1119 mutex_unlock(&local->mtx);
1122 1120
1123 if (local->ops->channel_switch) { 1121 if (local->ops->channel_switch) {
@@ -1833,11 +1831,11 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
1833 ieee80211_vif_release_channel(sdata); 1831 ieee80211_vif_release_channel(sdata);
1834 1832
1835 sdata->vif.csa_active = false; 1833 sdata->vif.csa_active = false;
1836 if (!ieee80211_csa_needs_block_tx(local)) 1834 if (sdata->csa_block_tx) {
1837 ieee80211_wake_queues_by_reason(&local->hw, 1835 ieee80211_wake_vif_queues(local, sdata,
1838 IEEE80211_MAX_QUEUE_MAP, 1836 IEEE80211_QUEUE_STOP_REASON_CSA);
1839 IEEE80211_QUEUE_STOP_REASON_CSA, 1837 sdata->csa_block_tx = false;
1840 false); 1838 }
1841 mutex_unlock(&local->mtx); 1839 mutex_unlock(&local->mtx);
1842 1840
1843 sdata->encrypt_headroom = IEEE80211_ENCRYPT_HEADROOM; 1841 sdata->encrypt_headroom = IEEE80211_ENCRYPT_HEADROOM;
@@ -2083,11 +2081,11 @@ static void __ieee80211_disconnect(struct ieee80211_sub_if_data *sdata)
2083 2081
2084 mutex_lock(&local->mtx); 2082 mutex_lock(&local->mtx);
2085 sdata->vif.csa_active = false; 2083 sdata->vif.csa_active = false;
2086 if (!ieee80211_csa_needs_block_tx(local)) 2084 if (sdata->csa_block_tx) {
2087 ieee80211_wake_queues_by_reason(&local->hw, 2085 ieee80211_wake_vif_queues(local, sdata,
2088 IEEE80211_MAX_QUEUE_MAP, 2086 IEEE80211_QUEUE_STOP_REASON_CSA);
2089 IEEE80211_QUEUE_STOP_REASON_CSA, 2087 sdata->csa_block_tx = false;
2090 false); 2088 }
2091 mutex_unlock(&local->mtx); 2089 mutex_unlock(&local->mtx);
2092 2090
2093 cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf, 2091 cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf,