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>
This commit is contained in:
committed by
John W. Linville
parent
4d70f2fbe1
commit
d074e8d547
@@ -1032,6 +1032,9 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
|
||||
if (ath9k_uses_beacons(vif->type))
|
||||
ath9k_beacon_remove_slot(sc, vif);
|
||||
|
||||
if (sc->csa_vif == vif)
|
||||
sc->csa_vif = NULL;
|
||||
|
||||
ath9k_ps_wakeup(sc);
|
||||
ath9k_calculate_summary_state(hw, NULL);
|
||||
ath9k_ps_restore(sc);
|
||||
@@ -2318,6 +2321,19 @@ static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)
|
||||
clear_bit(SC_OP_SCANNING, &sc->sc_flags);
|
||||
}
|
||||
|
||||
static void ath9k_channel_switch_beacon(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct cfg80211_chan_def *chandef)
|
||||
{
|
||||
struct ath_softc *sc = hw->priv;
|
||||
|
||||
/* mac80211 does not support CSA in multi-if cases (yet) */
|
||||
if (WARN_ON(sc->csa_vif))
|
||||
return;
|
||||
|
||||
sc->csa_vif = vif;
|
||||
}
|
||||
|
||||
struct ieee80211_ops ath9k_ops = {
|
||||
.tx = ath9k_tx,
|
||||
.start = ath9k_start,
|
||||
@@ -2365,4 +2381,5 @@ struct ieee80211_ops ath9k_ops = {
|
||||
#endif
|
||||
.sw_scan_start = ath9k_sw_scan_start,
|
||||
.sw_scan_complete = ath9k_sw_scan_complete,
|
||||
.channel_switch_beacon = ath9k_channel_switch_beacon,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user