ath11k: fix htt stats module not handle multiple skbs
authorPradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Tue, 12 May 2020 07:42:02 +0000 (10:42 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 13 May 2020 16:01:28 +0000 (19:01 +0300)
commit012f81456818dfb49d2939373b163945da3a4032
tree5ed60d3c20965308846c35eae8c664faba4d5780
parent104f3d95d8d633ceebcef811c5c7c3ba56bedc7f
ath11k: fix htt stats module not handle multiple skbs

HTT EXT stats comes in stream of TLVs spanning over multiple
messages. Currently completion is being sent for each message
which is creating a race where stats_req is being accessed
for filling in second message after the memory is already
freed in release operation. Fix this by issuing completion
once all the messages are received and processed. Driver
knows this info from DONE bit set in htt msg.

Also fix locking required for htt stats.

Co-developed-by: Miles Hu <milehu@codeaurora.org>
Signed-off-by: Miles Hu <milehu@codeaurora.org>
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1589221074-28778-1-git-send-email-pradeepc@codeaurora.org
drivers/net/wireless/ath/ath11k/debug_htt_stats.c
drivers/net/wireless/ath/ath11k/dp.h