Skip to content

Commit 080acff

Browse files
committed
wireless: ath12k: revert wrong codes after cherry pick changes.
1 parent e7bc36d commit 080acff

File tree

1 file changed

+4
-9
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+4
-9
lines changed

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4865,15 +4865,10 @@ int ath12k_mac_get_fw_stats(struct ath12k *ar,
48654865
* still there could be more events following. Below is to wait
48664866
* until firmware completes sending all the events.
48674867
*/
4868-
for (;;) {
4869-
if (time_after(jiffies, timeout))
4870-
break;
4871-
spin_lock_bh(&ar->data_lock);
4872-
if (ar->fw_stats.fw_stats_done) {
4873-
spin_unlock_bh(&ar->data_lock);
4874-
break;
4875-
}
4876-
spin_unlock_bh(&ar->data_lock);
4868+
time_left = wait_for_completion_timeout(&ar->fw_stats_done, 3 * HZ);
4869+
if (!time_left) {
4870+
ath12k_warn(ab, "time out while waiting for fw stats done\n");
4871+
return -ETIMEDOUT;
48774872
}
48784873

48794874
return 0;

0 commit comments

Comments
 (0)