Skip to content

Commit 3b6d00f

Browse files
Baochen Qiangjeff-t-johnson
authored andcommitted
wifi: ath11k: don't wait when there is no vdev started
For WMI_REQUEST_VDEV_STAT request, firmware might split response into multiple events dut to buffer limit, hence currently in ath11k_debugfs_fw_stats_process() we wait until all events received. In case there is no vdev started, this results in that below condition would never get satisfied ((++ar->fw_stats.num_vdev_recvd) == total_vdevs_started) finally the requestor would be blocked until wait time out. The same applies to WMI_REQUEST_BCN_STAT request as well due to: ((++ar->fw_stats.num_bcn_recvd) == ar->num_started_vdevs) Change to check the number of started vdev first: if it is zero, finish wait directly; if not, follow the old way. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Fixes: d5c6515 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Baochen Qiang <[email protected]> Reviewed-by: Vasanthakumar Thiagarajan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]>
1 parent 2bcf73b commit 3b6d00f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/net/wireless/ath/ath11k/debugfs.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void ath11k_debugfs_fw_stats_process(struct ath11k *ar, struct ath11k_fw_stats *
107107
{
108108
struct ath11k_base *ab = ar->ab;
109109
struct ath11k_pdev *pdev;
110-
bool is_end;
110+
bool is_end = true;
111111
size_t total_vdevs_started = 0;
112112
int i;
113113

@@ -132,7 +132,9 @@ void ath11k_debugfs_fw_stats_process(struct ath11k *ar, struct ath11k_fw_stats *
132132
total_vdevs_started += ar->num_started_vdevs;
133133
}
134134

135-
is_end = ((++ar->fw_stats.num_vdev_recvd) == total_vdevs_started);
135+
if (total_vdevs_started)
136+
is_end = ((++ar->fw_stats.num_vdev_recvd) ==
137+
total_vdevs_started);
136138

137139
list_splice_tail_init(&stats->vdevs,
138140
&ar->fw_stats.vdevs);
@@ -151,7 +153,9 @@ void ath11k_debugfs_fw_stats_process(struct ath11k *ar, struct ath11k_fw_stats *
151153
/* Mark end until we reached the count of all started VDEVs
152154
* within the PDEV
153155
*/
154-
is_end = ((++ar->fw_stats.num_bcn_recvd) == ar->num_started_vdevs);
156+
if (ar->num_started_vdevs)
157+
is_end = ((++ar->fw_stats.num_bcn_recvd) ==
158+
ar->num_started_vdevs);
155159

156160
list_splice_tail_init(&stats->bcn,
157161
&ar->fw_stats.bcn);

0 commit comments

Comments
 (0)