summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-10-08 02:48:40 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-10-09 05:30:09 -0400
commit0f791eb47f8222fd594e6f8a090632344ef23924 (patch)
treeec3771ef78ebd391e7c4e90472b5e8246f083703 /net/mac80211/mlme.c
parent0c21e6320f6ea7c4bd2fc0a8c1d8577b372f92d2 (diff)
mac80211: allow channel switch with multiple channel contexts
Channel switch with multiple channel contexts should now work fine. Remove check that disallows switches when multiple contexts are in use. 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.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 148253c1bd78..fb6561509caf 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1134,21 +1134,15 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
1134 1134
1135 chanctx = container_of(conf, struct ieee80211_chanctx, conf); 1135 chanctx = container_of(conf, struct ieee80211_chanctx, conf);
1136 1136
1137 if (local->use_chanctx) { 1137 if (local->use_chanctx &&
1138 u32 num_chanctx = 0; 1138 !(local->hw.flags & IEEE80211_HW_CHANCTX_STA_CSA)) {
1139 list_for_each_entry(chanctx, &local->chanctx_list, list) 1139 sdata_info(sdata,
1140 num_chanctx++; 1140 "driver doesn't support chan-switch with channel contexts\n");
1141 1141 ieee80211_queue_work(&local->hw,
1142 if (num_chanctx > 1 || 1142 &ifmgd->csa_connection_drop_work);
1143 !(local->hw.flags & IEEE80211_HW_CHANCTX_STA_CSA)) { 1143 mutex_unlock(&local->chanctx_mtx);
1144 sdata_info(sdata, 1144 mutex_unlock(&local->mtx);
1145 "not handling chan-switch with channel contexts\n"); 1145 return;
1146 ieee80211_queue_work(&local->hw,
1147 &ifmgd->csa_connection_drop_work);
1148 mutex_unlock(&local->chanctx_mtx);
1149 mutex_unlock(&local->mtx);
1150 return;
1151 }
1152 } 1146 }
1153 1147
1154 ch_switch.timestamp = timestamp; 1148 ch_switch.timestamp = timestamp;
@@ -1192,7 +1186,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
1192 1186
1193 if (local->ops->channel_switch) { 1187 if (local->ops->channel_switch) {
1194 /* use driver's channel switch callback */ 1188 /* use driver's channel switch callback */
1195 drv_channel_switch(local, &ch_switch); 1189 drv_channel_switch(local, sdata, &ch_switch);
1196 return; 1190 return;
1197 } 1191 }
1198 1192