Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec6bc552 authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo
Browse files

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: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 216a1836
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -2771,6 +2771,9 @@ static void ath10k_remove_interface(struct ieee80211_hw *hw,


	spin_lock_bh(&ar->data_lock);
	spin_lock_bh(&ar->data_lock);
	if (arvif->beacon) {
	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);
		dev_kfree_skb_any(arvif->beacon);
		arvif->beacon = NULL;
		arvif->beacon = NULL;
	}
	}