ath11k: fix resource unavailability for htt stats after peer stats display
authorSowmiya Sree Elavalagan <ssreeela@codeaurora.org>
Mon, 4 May 2020 11:45:55 +0000 (17:15 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 5 May 2020 07:37:54 +0000 (10:37 +0300)
commit52f274b519939f5e306b26f2a3cf7c63ef45c203
tree1e2e2525bca29af751a66dd27e35ab4094d0ca45
parentb7b527b9c7c8d50737f45167d2d3399c7278d9e9
ath11k: fix resource unavailability for htt stats after peer stats display

htt stats are not working after htt peer stats display
and also after htt peer stats reset. Trying to dump htt
stats shows "Resource temporarily unavailable".
This is because of "ar->debug.htt_stats.stats_req" member is being
consecutively used for all htt stats without being reset
during the previous usage. Hence assigning NULL to this member
after freeing the allocated memory fixes the issue.

console logs below:
# echo 9 >/sys/kernel/debug/ath11k/ipq8074/mac1/htt_stats_type
# cat /sys/kernel/debug/ath11k/ipq8074/mac1/htt_stats_type
9
# cat /sys/kernel/debug/ath11k/ipq8074/mac1/htt_stats
cat: can't open '/sys/kernel/debug/ath11k/ipq8074/mac1/htt_stats'
: Resource temporarily unavailable

Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1588592755-10427-1-git-send-email-ssreeela@codeaurora.org
drivers/net/wireless/ath/ath11k/debugfs_sta.c