ath10k: Remove msdu from idr when management pkt send fails
authorRakesh Pillai <pillair@codeaurora.org>
Fri, 8 May 2020 02:55:18 +0000 (05:55 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 11 May 2020 12:32:28 +0000 (15:32 +0300)
commitc730c477176ad4af86d9aae4d360a7ad840b073a
tree4998513557983da1edc48a7396a834114007f2b8
parent7c6d67b136ceb0aebc7a3153b300e925ed915daf
ath10k: Remove msdu from idr when management pkt send fails

Currently when the sending of any management pkt
via wmi command fails, the packet is being unmapped
freed in the error handling. But the idr entry added,
which is used to track these packet is not getting removed.

Hence, during unload, in wmi cleanup, all the entries
in IDR are removed and the corresponding buffer is
attempted to be freed. This can cause a situation where
one packet is attempted to be freed twice.

Fix this error by rmeoving the msdu from the idr
list when the sending of a management packet over
wmi fails.

Tested HW: WCN3990
Tested FW: WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1

Fixes: 1807da49733e ("ath10k: wmi: add management tx by reference support over wmi")
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1588667015-25490-1-git-send-email-pillair@codeaurora.org
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/wmi-ops.h
drivers/net/wireless/ath/ath10k/wmi-tlv.c