Commit 76eec44
committed
wifi: ath12k: don't use static variables in ath12k_wmi_fw_stats_process()
JIRA: https://issues.redhat.com/browse/RHEL-122256
commit ac7b8ff
Author: Baochen Qiang <quic_bqiang@quicinc.com>
Date: Thu Jun 12 09:31:51 2025 +0800
wifi: ath12k: don't use static variables in ath12k_wmi_fw_stats_process()
Currently ath12k_wmi_fw_stats_process() is using static variables to count
firmware stat events. Taking num_vdev as an example, if for whatever
reason (say ar->num_started_vdevs is 0 or firmware bug etc.) the following
condition
(++num_vdev) == total_vdevs_started
is not met, is_end is not set thus num_vdev won't be cleared. Next time
when firmware stats is requested again, even if everything is working
fine, failure is expected due to the condition above will never be
satisfied.
The same applies to num_bcn as well.
Change to use non-static counters and reset them each time before firmware
stats is requested.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284.1-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Tested-on: QCN9274 hw2.0 WLAN.WBE.1.5-01651-QCAHKSWPL_SILICONZ-1
Fixes: e367c92 ("wifi: ath12k: Request vdev stats from firmware")
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Link: https://patch.msgid.link/20250612-ath12k-fw-fixes-v1-3-12f594f3b857@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>1 parent f1bb514 commit 76eec44
3 files changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1230 | 1230 | | |
1231 | 1231 | | |
1232 | 1232 | | |
| 1233 | + | |
| 1234 | + | |
1233 | 1235 | | |
1234 | 1236 | | |
1235 | 1237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| 635 | + | |
| 636 | + | |
635 | 637 | | |
636 | 638 | | |
637 | 639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8166 | 8166 | | |
8167 | 8167 | | |
8168 | 8168 | | |
8169 | | - | |
8170 | 8169 | | |
8171 | 8170 | | |
8172 | 8171 | | |
| |||
8186 | 8185 | | |
8187 | 8186 | | |
8188 | 8187 | | |
8189 | | - | |
| 8188 | + | |
8190 | 8189 | | |
8191 | 8190 | | |
8192 | 8191 | | |
8193 | 8192 | | |
8194 | | - | |
| 8193 | + | |
8195 | 8194 | | |
8196 | | - | |
8197 | | - | |
| 8195 | + | |
8198 | 8196 | | |
8199 | 8197 | | |
8200 | 8198 | | |
| |||
8206 | 8204 | | |
8207 | 8205 | | |
8208 | 8206 | | |
8209 | | - | |
| 8207 | + | |
8210 | 8208 | | |
8211 | 8209 | | |
8212 | 8210 | | |
8213 | 8211 | | |
8214 | | - | |
| 8212 | + | |
8215 | 8213 | | |
8216 | | - | |
8217 | | - | |
8218 | 8214 | | |
8219 | 8215 | | |
8220 | 8216 | | |
| |||
0 commit comments