mac80211: implement STA CSA for drivers using channel contexts

Limit the current implementation to a single channel context used by
a single vif, thereby avoiding multi-vif/channel complexities.

Reuse the main function from AP CSA code, but move a portion out in
order to fit the STA scenario.

Add a new mac80211 HW flag so we don't break devices that don't support
channel switch with channel-contexts. The new behavior will be opt-in.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Arik Nemtsov
2013-09-01 17:15:51 +03:00
committed by Johannes Berg
parent c6ca5e28bc
commit 7578d57520
4 changed files with 56 additions and 21 deletions

View File

@@ -2871,6 +2871,11 @@ void ieee80211_csa_finalize_work(struct work_struct *work)
if (WARN_ON(err < 0))
return;
if (!local->use_chanctx) {
local->_oper_chandef = local->csa_chandef;
ieee80211_hw_config(local, 0);
}
ieee80211_bss_info_change_notify(sdata, changed);
switch (sdata->vif.type) {