| From 90d0498d91b9702d60dd52208856efdc2fe50506 Mon Sep 17 00:00:00 2001 |
| From: Wen Gong <quic_wgong@quicinc.com> |
| Date: Sun, 3 Jul 2022 11:27:53 -0400 |
| Subject: [PATCH] CHROMIUM: ath11k: change complete() to complete_all() for |
| scan.completed |
| |
| Currently commit "ath11k: reduce the wait time of 11d scan and hw scan |
| while add interface" introduced a wait_for_completion_timeout operation |
| for ar->scan.completed, another one is existed in ath11k_scan_stop(), |
| then ath11k has two places to wait for the ar->scan.completed and they |
| run in different thread, thus it is possible to happend that the two |
| thread both enter wait status. To handle this scenario, ath11k should |
| change the complete() to complete_all() for the ar->scan.completed. This |
| also work well when it is only one thread wait for ar->scan.completed. |
| |
| Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3 |
| |
| BUG=b:240444280, b:243707743 |
| TEST=suspend_stress_test |
| |
| Signed-off-by: Wen Gong <quic_wgong@quicinc.com> |
| Signed-off-by: Jun Yu <junyuu@chromium.org> |
| Change-Id: Ic5b2c8243b741420287b0f4474529b23b4db7c17 |
| Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3893507 |
| Reviewed-by: Abhishek Kumar <kuabhs@chromium.org> |
| --- |
| drivers/net/wireless/ath/ath11k/core.c | 2 +- |
| drivers/net/wireless/ath/ath11k/mac.c | 2 +- |
| 2 files changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c |
| index 21c8e5bd477d..4bc96c3a4490 100644 |
| --- a/drivers/net/wireless/ath/ath11k/core.c |
| +++ b/drivers/net/wireless/ath/ath11k/core.c |
| @@ -1544,7 +1544,7 @@ static void ath11k_core_pre_reconfigure_recovery(struct ath11k_base *ab) |
| ar->state_11d = ATH11K_11D_IDLE; |
| complete(&ar->completed_11d_scan); |
| complete(&ar->scan.started); |
| - complete(&ar->scan.completed); |
| + complete_all(&ar->scan.completed); |
| complete(&ar->scan.on_channel); |
| complete(&ar->peer_assoc_done); |
| complete(&ar->peer_delete_done); |
| diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c |
| index d81f49c83ff9..3189124cfdbf 100644 |
| --- a/drivers/net/wireless/ath/ath11k/mac.c |
| +++ b/drivers/net/wireless/ath/ath11k/mac.c |
| @@ -3451,7 +3451,7 @@ void __ath11k_mac_scan_finish(struct ath11k *ar) |
| ar->scan_channel = NULL; |
| ar->scan.roc_freq = 0; |
| cancel_delayed_work(&ar->scan.timeout); |
| - complete(&ar->scan.completed); |
| + complete_all(&ar->scan.completed); |
| break; |
| } |
| } |
| -- |
| 2.37.3.998.g577e59143f-goog |
| |