aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2013-08-14 02:01:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-08-16 14:17:50 -0400
commitd074e8d547853cc8b40cf93a460e8fbf9eaa3d00 (patch)
tree9b7285946795fb7ed20336770453ec7b16822db9 /drivers/net/wireless/ath/ath9k/main.c
parent4d70f2fbe12118c5526a1d761f8ef562cecbbc2c (diff)
ath9k: enable CSA functionality in ath9k
CSA is only enabled for one interface, but the same limitation applies for mac80211 too. It checks whether the beacon has been sent (different approaches for non-EDMA-enabled and EDMA-enabled devices), and completes the channel switch after that. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index ba382a8c8b9a..ac9f18fa0729 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1032,6 +1032,9 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
1032 if (ath9k_uses_beacons(vif->type)) 1032 if (ath9k_uses_beacons(vif->type))
1033 ath9k_beacon_remove_slot(sc, vif); 1033 ath9k_beacon_remove_slot(sc, vif);
1034 1034
1035 if (sc->csa_vif == vif)
1036 sc->csa_vif = NULL;
1037
1035 ath9k_ps_wakeup(sc); 1038 ath9k_ps_wakeup(sc);
1036 ath9k_calculate_summary_state(hw, NULL); 1039 ath9k_calculate_summary_state(hw, NULL);
1037 ath9k_ps_restore(sc); 1040 ath9k_ps_restore(sc);
@@ -2318,6 +2321,19 @@ static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)
2318 clear_bit(SC_OP_SCANNING, &sc->sc_flags); 2321 clear_bit(SC_OP_SCANNING, &sc->sc_flags);
2319} 2322}
2320 2323
2324static void ath9k_channel_switch_beacon(struct ieee80211_hw *hw,
2325 struct ieee80211_vif *vif,
2326 struct cfg80211_chan_def *chandef)
2327{
2328 struct ath_softc *sc = hw->priv;
2329
2330 /* mac80211 does not support CSA in multi-if cases (yet) */
2331 if (WARN_ON(sc->csa_vif))
2332 return;
2333
2334 sc->csa_vif = vif;
2335}
2336
2321struct ieee80211_ops ath9k_ops = { 2337struct ieee80211_ops ath9k_ops = {
2322 .tx = ath9k_tx, 2338 .tx = ath9k_tx,
2323 .start = ath9k_start, 2339 .start = ath9k_start,
@@ -2365,4 +2381,5 @@ struct ieee80211_ops ath9k_ops = {
2365#endif 2381#endif
2366 .sw_scan_start = ath9k_sw_scan_start, 2382 .sw_scan_start = ath9k_sw_scan_start,
2367 .sw_scan_complete = ath9k_sw_scan_complete, 2383 .sw_scan_complete = ath9k_sw_scan_complete,
2384 .channel_switch_beacon = ath9k_channel_switch_beacon,
2368}; 2385};