Message ID | 20250109-fix_reboot_issues_with_hw_grouping-v1-8-fb39ec03451e@quicinc.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: ath12k: fixes for rmmod and recovery issues with hardware grouping | expand |
diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index b67ef79e62b3fbb5667cb627cf565998a35f3c49..0a9e35695f760799273eeba32b889375232eedc0 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -1394,12 +1394,22 @@ static void ath12k_core_restart(struct work_struct *work) ath12k_dbg(ab, ATH12K_DBG_BOOT, "reset success\n"); } + mutex_lock(&ab->ag->mutex); + + if (!ath12k_core_hw_group_start_ready(ab->ag)) { + mutex_unlock(&ab->ag->mutex); + goto exit_restart; + } + for (i = 0; i < ath12k_get_num_hw(ab); i++) { ah = ath12k_ab_to_ah(ab, i); ieee80211_restart_hw(ah->hw); } + + mutex_unlock(&ab->ag->mutex); } +exit_restart: complete(&ab->restart_completed); }
Currently, when ath12k_core_restart() is called and the ab->is_reset flag is set, it invokes ieee80211_restart_hw() for all hardware in the same group. However, other hardware might still be in the recovery process, making this call inappropriate with grouping into picture. To address this, add a condition to check if the group is ready. If the group is not ready, do not call ieee80211_restart_hw(). Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> --- drivers/net/wireless/ath/ath12k/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+)