[PATCH] ath10k: dont call csa_finish more than once
Michal Kazior
michal.kazior at tieto.com
Fri Mar 21 10:02:00 EDT 2014
Driver is supposed to call it only once for each
scheduled channel_switch_beacon().
Signed-off-by: Michal Kazior <michal.kazior at tieto.com>
---
This is required for multi-vif csa but since that
isn't merged yet I'm not including any specifics
in the commit log itself.
Preventing multiple ieee80211_csa_finish() calls
sounds like a good idea in general to me.
drivers/net/wireless/ath/ath10k/core.h | 1 +
drivers/net/wireless/ath/ath10k/mac.c | 5 +++--
drivers/net/wireless/ath/ath10k/wmi.c | 5 ++++-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index ad209a6..cf4f756 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -228,6 +228,7 @@ struct ath10k_vif {
struct ath10k *ar;
struct ieee80211_vif *vif;
+ bool csa_finished;
bool is_started;
bool is_up;
u32 aid;
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 52ae380..583daba 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4090,8 +4090,9 @@ static void ath10k_channel_switch_beacon(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct cfg80211_chan_def *chandef)
{
- /* there's no need to do anything here. vif->csa_active is enough */
- return;
+ struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
+
+ arvif->csa_finished = false;
}
static void ath10k_sta_rc_update(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 48130fe..1630cd8 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1414,7 +1414,10 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
* actual channel switch is done */
if (arvif->vif->csa_active &&
ieee80211_csa_is_complete(arvif->vif)) {
- ieee80211_csa_finish(arvif->vif);
+ if (!arvif->csa_finished) {
+ ieee80211_csa_finish(arvif->vif);
+ arvif->csa_finished = true;
+ }
continue;
}
--
1.8.5.3
More information about the ath10k
mailing list