summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Kazior2014-04-23 18:30:06 +0200
committerKalle Valo2014-04-24 08:23:03 +0200
commitd9bc4b9b693d52dc14dc1de5dfec760634067d8c (patch)
treece2ff3ea33a82976faf1a70c6557dc1aae82ce26
parentath10k: prevent beacon memory leak (diff)
downloadkernel-qcow2-linux-d9bc4b9b693d52dc14dc1de5dfec760634067d8c.tar.gz
kernel-qcow2-linux-d9bc4b9b693d52dc14dc1de5dfec760634067d8c.tar.xz
kernel-qcow2-linux-d9bc4b9b693d52dc14dc1de5dfec760634067d8c.zip
ath10k: fix firmware recovery with ap interface
Beacon data wasn't properly cleared during early phase of recovery. This in turn caused firmware to crash because the beacon data was submitted before vdevs were fully re-configured. Ultimately the device was considered wedged and nothing worked until driver was reloaded. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 22e82398c45b..e2c01dc5900c 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -2291,6 +2291,8 @@ static void ath10k_tx(struct ieee80211_hw *hw,
*/
void ath10k_halt(struct ath10k *ar)
{
+ struct ath10k_vif *arvif;
+
lockdep_assert_held(&ar->conf_mutex);
if (ath10k_monitor_is_enabled(ar)) {
@@ -2313,6 +2315,17 @@ void ath10k_halt(struct ath10k *ar)
ar->scan.in_progress = false;
ieee80211_scan_completed(ar->hw, true);
}
+
+ list_for_each_entry(arvif, &ar->arvifs, list) {
+ if (!arvif->beacon)
+ continue;
+
+ dma_unmap_single(arvif->ar->dev,
+ ATH10K_SKB_CB(arvif->beacon)->paddr,
+ arvif->beacon->len, DMA_TO_DEVICE);
+ dev_kfree_skb_any(arvif->beacon);
+ arvif->beacon = NULL;
+ }
spin_unlock_bh(&ar->data_lock);
}