summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath12k/debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath12k/debugfs.c')
-rw-r--r--drivers/net/wireless/ath/ath12k/debugfs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath12k/debugfs.c b/drivers/net/wireless/ath/ath12k/debugfs.c
index 15219429d4ed..d6a86f075d73 100644
--- a/drivers/net/wireless/ath/ath12k/debugfs.c
+++ b/drivers/net/wireless/ath/ath12k/debugfs.c
@@ -1286,6 +1286,7 @@ static int ath12k_open_vdev_stats(struct inode *inode, struct file *file)
ath12k_wmi_fw_stats_dump(ar, &ar->fw_stats, param.stats_id,
buf);
+ ath12k_fw_stats_reset(ar);
file->private_data = no_free_ptr(buf);
@@ -1352,12 +1353,7 @@ static int ath12k_open_bcn_stats(struct inode *inode, struct file *file)
ath12k_wmi_fw_stats_dump(ar, &ar->fw_stats, param.stats_id,
buf);
- /* since beacon stats request is looped for all active VDEVs, saved fw
- * stats is not freed for each request until done for all active VDEVs
- */
- spin_lock_bh(&ar->data_lock);
- ath12k_fw_stats_bcn_free(&ar->fw_stats.bcn);
- spin_unlock_bh(&ar->data_lock);
+ ath12k_fw_stats_reset(ar);
file->private_data = no_free_ptr(buf);
@@ -1418,6 +1414,7 @@ static int ath12k_open_pdev_stats(struct inode *inode, struct file *file)
ath12k_wmi_fw_stats_dump(ar, &ar->fw_stats, param.stats_id,
buf);
+ ath12k_fw_stats_reset(ar);
file->private_data = no_free_ptr(buf);