summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Kazior2014-04-23 18:30:05 +0200
committerKalle Valo2014-04-24 08:22:29 +0200
commitec6bc5523b40008448bad5eadcdcf4cdbf9c7054 (patch)
tree109a389c870c53533b7cc7ee53d64ff9e178620b
parentath10k: skip suspending when recovering (diff)
downloadkernel-qcow2-linux-ec6bc5523b40008448bad5eadcdcf4cdbf9c7054.tar.gz
kernel-qcow2-linux-ec6bc5523b40008448bad5eadcdcf4cdbf9c7054.tar.xz
kernel-qcow2-linux-ec6bc5523b40008448bad5eadcdcf4cdbf9c7054.zip
ath10k: make sure to not leak beacon dma mapping
If for some reason mac80211 wouldn't stop beaconing gracefully and just removed interface of a running AP/IBSS interface it was possible to leak pending beacon DMA mapping. It's very unlikely but better safe than sorry. 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 8385a7ad02ac..22e82398c45b 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -2771,6 +2771,9 @@ static void ath10k_remove_interface(struct ieee80211_hw *hw,
spin_lock_bh(&ar->data_lock);
if (arvif->beacon) {
+ 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;
}