ath11k: fix resource unavailability for htt stats after peer stats display
PATCH 1/1 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
--- drivers/net/wireless/ath/ath11k/debugfs_sta.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/net/wireless/ath/ath11k/debugfs_sta.c +9 -0
@@ -435,13 +435,22 @@ ath11k_dbg_sta_open_htt_peer_stats(struct inode *inode, struct file *file)return 0 ; out:vfree (stats_req); + ar->debug.htt_stats.stats_req =NULL ;return ret; }static int ath11k_dbg_sta_release_htt_peer_stats (struct inode *inode,struct file *file) { +struct ieee80211_sta *sta = inode->i_private; +struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv; +struct ath11k *ar = arsta->arvif->ar; + +mutex_lock (&ar->conf_mutex);vfree (file->private_data); + ar->debug.htt_stats.stats_req =NULL ; +mutex_unlock (&ar->conf_mutex); +return 0 ; }
Signature · 1 line
2.7.4
Quoted 16 lines · Sowmiya Sree Elavalagan
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
Quoted 2 lines
Signed-off-by Sowmiya Sree Elavalagan <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
52f274b51993 ath11k: fix resource unavailability for htt stats after peer stats display
Signature · 8 lines
https://patchwork.kernel.org/patch/11525557/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 16 lines · Sowmiya Sree Elavalagan
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
Quoted 2 lines
Signed-off-by Sowmiya Sree Elavalagan <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
52f274b51993 ath11k: fix resource unavailability for htt stats after peer stats display
Signature · 3 lines
https://patchwork.kernel.org/patch/11525557/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches