Skip to content

Commit ad5e917

Browse files
Baochen Qiangjeff-t-johnson
authored andcommitted
wifi: ath12k: 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 ath12k_wmi_fw_stats_process() host waits 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) consequently the requestor would be blocked until 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 directly; if not, follow the old way. 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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]>
1 parent ac7b8ff commit ad5e917

File tree

1 file changed

+7
-3
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+7
-3
lines changed

drivers/net/wireless/ath/ath12k/wmi.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8165,7 +8165,7 @@ static void ath12k_wmi_fw_stats_process(struct ath12k *ar,
81658165
{
81668166
struct ath12k_base *ab = ar->ab;
81678167
struct ath12k_pdev *pdev;
8168-
bool is_end;
8168+
bool is_end = true;
81698169
size_t total_vdevs_started = 0;
81708170
int i;
81718171

@@ -8185,7 +8185,9 @@ static void ath12k_wmi_fw_stats_process(struct ath12k *ar,
81858185
}
81868186
rcu_read_unlock();
81878187

8188-
is_end = ((++ar->fw_stats.num_vdev_recvd) == total_vdevs_started);
8188+
if (total_vdevs_started)
8189+
is_end = ((++ar->fw_stats.num_vdev_recvd) ==
8190+
total_vdevs_started);
81898191

81908192
list_splice_tail_init(&stats->vdevs,
81918193
&ar->fw_stats.vdevs);
@@ -8204,7 +8206,9 @@ static void ath12k_wmi_fw_stats_process(struct ath12k *ar,
82048206
/* Mark end until we reached the count of all started VDEVs
82058207
* within the PDEV
82068208
*/
8207-
is_end = ((++ar->fw_stats.num_bcn_recvd) == ar->num_started_vdevs);
8209+
if (ar->num_started_vdevs)
8210+
is_end = ((++ar->fw_stats.num_bcn_recvd) ==
8211+
ar->num_started_vdevs);
82088212

82098213
list_splice_tail_init(&stats->bcn,
82108214
&ar->fw_stats.bcn);

0 commit comments

Comments
 (0)