aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 9958cb7df8f1..237e2ef42ba9 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -988,6 +988,7 @@ static void ieee80211_chswitch_work(struct work_struct *work)
988{ 988{
989 struct ieee80211_sub_if_data *sdata = 989 struct ieee80211_sub_if_data *sdata =
990 container_of(work, struct ieee80211_sub_if_data, u.mgd.chswitch_work); 990 container_of(work, struct ieee80211_sub_if_data, u.mgd.chswitch_work);
991 struct ieee80211_local *local = sdata->local;
991 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 992 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
992 993
993 if (!ieee80211_sdata_running(sdata)) 994 if (!ieee80211_sdata_running(sdata))
@@ -997,21 +998,30 @@ static void ieee80211_chswitch_work(struct work_struct *work)
997 if (!ifmgd->associated) 998 if (!ifmgd->associated)
998 goto out; 999 goto out;
999 1000
1000 sdata->local->_oper_channel = sdata->local->csa_channel; 1001 /*
1001 if (!sdata->local->ops->channel_switch) { 1002 * FIXME: Here we are downgrading to NL80211_CHAN_WIDTH_20_NOHT
1003 * and don't adjust our ht/vht settings
1004 * This is wrong - we should behave according to the CSA params
1005 */
1006 local->_oper_chandef.chan = local->csa_channel;
1007 local->_oper_chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
1008 local->_oper_chandef.center_freq1 =
1009 local->_oper_chandef.chan->center_freq;
1010 local->_oper_chandef.center_freq2 = 0;
1011
1012 if (!local->ops->channel_switch) {
1002 /* call "hw_config" only if doing sw channel switch */ 1013 /* call "hw_config" only if doing sw channel switch */
1003 ieee80211_hw_config(sdata->local, 1014 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
1004 IEEE80211_CONF_CHANGE_CHANNEL);
1005 } else { 1015 } else {
1006 /* update the device channel directly */ 1016 /* update the device channel directly */
1007 sdata->local->hw.conf.channel = sdata->local->_oper_channel; 1017 local->hw.conf.chandef = local->_oper_chandef;
1008 } 1018 }
1009 1019
1010 /* XXX: shouldn't really modify cfg80211-owned data! */ 1020 /* XXX: shouldn't really modify cfg80211-owned data! */
1011 ifmgd->associated->channel = sdata->local->_oper_channel; 1021 ifmgd->associated->channel = local->_oper_chandef.chan;
1012 1022
1013 /* XXX: wait for a beacon first? */ 1023 /* XXX: wait for a beacon first? */
1014 ieee80211_wake_queues_by_reason(&sdata->local->hw, 1024 ieee80211_wake_queues_by_reason(&local->hw,
1015 IEEE80211_MAX_QUEUE_MAP, 1025 IEEE80211_MAX_QUEUE_MAP,
1016 IEEE80211_QUEUE_STOP_REASON_CSA); 1026 IEEE80211_QUEUE_STOP_REASON_CSA);
1017 out: 1027 out: