diff options
author | Chun-Yeow Yeoh <yeohchunyeow@gmail.com> | 2015-06-09 15:59:49 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-06-15 12:44:34 +0300 |
commit | f0e449627e4ac7fe6a662e284a1cf365b1f197e0 (patch) | |
tree | e6ecc0af23a8db5e2ee004d597ca1a521e3e0ac4 /drivers/net/wireless/ath/ath9k/htc_drv_main.c | |
parent | 5b18ffb2d725571b4642f44249c55e4d1fcf60de (diff) | |
download | linux-f0e449627e4ac7fe6a662e284a1cf365b1f197e0.tar.gz linux-f0e449627e4ac7fe6a662e284a1cf365b1f197e0.tar.bz2 linux-f0e449627e4ac7fe6a662e284a1cf365b1f197e0.zip |
ath9k_htc: add support of channel switch
Add the support of channel switching functionality, similar
to ath9k support.
Tested with TP-Link TL-WN722N and TL-WN821N.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc_drv_main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index b71f3072fd9a..dab1323dfec7 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -1134,6 +1134,9 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw, priv->nvifs--; priv->vif_slot &= ~(1 << avp->index); + if (priv->csa_vif == vif) + priv->csa_vif = NULL; + ath9k_htc_remove_station(priv, vif, NULL); DEC_VIF(priv, vif->type); @@ -1841,6 +1844,19 @@ static int ath9k_htc_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, return 0; } +static void ath9k_htc_channel_switch_beacon(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct cfg80211_chan_def *chandef) +{ + struct ath9k_htc_priv *priv = hw->priv; + + /* mac80211 does not support CSA in multi-if cases (yet) */ + if (WARN_ON(priv->csa_vif)) + return; + + priv->csa_vif = vif; +} + struct ieee80211_ops ath9k_htc_ops = { .tx = ath9k_htc_tx, .start = ath9k_htc_start, @@ -1867,6 +1883,7 @@ struct ieee80211_ops ath9k_htc_ops = { .set_bitrate_mask = ath9k_htc_set_bitrate_mask, .get_stats = ath9k_htc_get_stats, .get_antenna = ath9k_htc_get_antenna, + .channel_switch_beacon = ath9k_htc_channel_switch_beacon, #ifdef CONFIG_ATH9K_HTC_DEBUGFS .get_et_sset_count = ath9k_htc_get_et_sset_count, |