summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath11k/core.h
diff options
context:
space:
mode:
authorWen Gong <quic_wgong@quicinc.com>2022-03-21 14:16:57 +0300
committerKalle Valo <quic_kvalo@quicinc.com>2022-03-23 11:56:37 +0300
commit38194f3a605e4a961f28bc38a73a4f4d43123968 (patch)
treede9af4c36857242fa1f3f1f8cce234cf310f55dc /drivers/net/wireless/ath/ath11k/core.h
parent13da397f884d9c9a3fb6616206eeb6c6ab097287 (diff)
downloadlinux-38194f3a605e4a961f28bc38a73a4f4d43123968.tar.xz
ath11k: add synchronization operation between reconfigure of mac80211 and ath11k_base
ieee80211_reconfig() of mac80211 is the main function for recovery of each ieee80211_hw and ath11k, and ath11k_core_reconfigure_on_crash() is the main function for recovery of ath11k_base, it has more than one ieee80211_hw and ath11k for each ath11k_base, so it need to add synchronization between them, otherwise it has many issue. For example, when ath11k_core_reconfigure_on_crash() is not complete, mac80211 send a hw scan request to ath11k, it leads firmware crash, because firmware has not been initialized at that moment, firmware is only finished downloaded and loaded, it can not receive scan command. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2 Signed-off-by: Wen Gong <quic_wgong@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220228064606.8981-3-quic_wgong@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/core.h')
-rw-r--r--drivers/net/wireless/ath/ath11k/core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
index bd31413d84ca..70eb6e418422 100644
--- a/drivers/net/wireless/ath/ath11k/core.h
+++ b/drivers/net/wireless/ath/ath11k/core.h
@@ -44,6 +44,8 @@ extern unsigned int ath11k_frame_mode;
#define ATH11K_RESET_MAX_FAIL_COUNT_FIRST 3
#define ATH11K_RESET_MAX_FAIL_COUNT_FINAL 5
#define ATH11K_RESET_FAIL_TIMEOUT_HZ (20 * HZ)
+#define ATH11K_RECONFIGURE_TIMEOUT_HZ (10 * HZ)
+#define ATH11K_RECOVER_START_TIMEOUT_HZ (20 * HZ)
enum ath11k_supported_bw {
ATH11K_BW_20 = 0,
@@ -828,8 +830,11 @@ struct ath11k_base {
struct work_struct reset_work;
atomic_t reset_count;
atomic_t recovery_count;
+ atomic_t recovery_start_count;
bool is_reset;
struct completion reset_complete;
+ struct completion reconfigure_complete;
+ struct completion recovery_start;
/* continuous recovery fail count */
atomic_t fail_cont_count;
unsigned long reset_fail_timeout;