summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath10k/wmi-tlv.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2015-03-05 17:02:17 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2015-03-07 10:39:16 +0300
commit81a9a17db5d766d2872c4ab8a77b8666d22031ec (patch)
tree2978594bd85000263b2ab6f49297ad5461315d6a /drivers/net/wireless/ath/ath10k/wmi-tlv.c
parentb24af141c81a0885cb736b8eedbe6427e5e5cd1b (diff)
downloadlinux-81a9a17db5d766d2872c4ab8a77b8666d22031ec.tar.xz
ath10k: fix AP/IBSS CSA with template based fw
qca6174 with wmi-tlv firmware uses offloaded beaconing scheme (i.e. templates). This requires a little different approach when implementing CSA. Add missing code to update CS count and report CSA completion to mac80211. Without it channel switch was never finished. To avoid races during interface teardown data_lock has been used to protect is_up and is_started so they can be compared against before scheduling count down work. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/wmi-tlv.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi-tlv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index ee0c5f602e29..5721d1fc21c7 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -17,6 +17,7 @@
#include "core.h"
#include "debug.h"
#include "hw.h"
+#include "mac.h"
#include "wmi.h"
#include "wmi-ops.h"
#include "wmi-tlv.h"
@@ -168,6 +169,7 @@ static int ath10k_wmi_tlv_event_bcn_tx_status(struct ath10k *ar,
{
const void **tb;
const struct wmi_tlv_bcn_tx_status_ev *ev;
+ struct ath10k_vif *arvif;
u32 vdev_id, tx_status;
int ret;
@@ -201,6 +203,12 @@ static int ath10k_wmi_tlv_event_bcn_tx_status(struct ath10k *ar,
break;
}
+ spin_lock_bh(&ar->data_lock);
+ arvif = ath10k_get_arvif(ar, vdev_id);
+ if (arvif && arvif->is_up)
+ ieee80211_queue_work(ar->hw, &arvif->ap_csa_work);
+ spin_unlock_bh(&ar->data_lock);
+
kfree(tb);
return 0;
}