diff mbox series

[08/10] wifi: ath12k: avoid stopping mac80211 queues in ath12k_core_restart()

Message ID 20240412060620.27519-9-quic_bqiang@quicinc.com
State New
Headers show
Series wifi: ath12k: support suspend/resume | expand

Commit Message

Baochen Qiang April 12, 2024, 6:06 a.m. UTC
Currently when resume ath12k_core_restart() calls
ath12k_core_pre_reconfigure_recovery() where mac80211 queues are
stopped by calling ieee80211_stop_queues(). Then in
ath12k_mac_op_reconfig_complete() those queues are not started
because ieee80211_wake_queues() is skipped due to the check on
reconfig_type. The result is that mac80211
could not deliver any frame to ath12k to send out, finally making
connection fail.

[84473.104249] PM: suspend exit
[84479.372397] wlan0: no VHT 160 MHz capability on 5 GHz, limiting to 80 MHz
[84479.372401] wlan0: determined local STA to be EHT, BW limited to 80 MHz
[84479.372416] wlan0: determined AP 00:03:7f:12:b7:b7 to be HE
[84479.372420] wlan0: connecting with HE mode, max bandwidth 80 MHz
[84479.580348] wlan0: authenticate with 00:03:7f:12:b7:b7 (local address=00:03:7f:37:11:53)
[84479.580351] wlan0: send auth to 00:03:7f:12:b7:b7 (try 1/3)
[84480.698993] wlan0: send auth to 00:03:7f:12:b7:b7 (try 2/3)
[84481.816505] wlan0: send auth to 00:03:7f:12:b7:b7 (try 3/3)
[84482.810966] wlan0: authentication with 00:03:7f:12:b7:b7 timed out

Actually we don't need to stop/start queues during suspend/resume,
so remove ath12k_core_pre_reconfigure_recovery() from ath12k_core_restart().
This won't cause any regression because currently the only chance
ath12k_core_restart() gets called is in reset case, where ab->is_reset
is set so that function will never be executed.

Also remove ath12k_core_post_reconfigure_recovery() because it is
not needed in suspend/resume case. This is also valid due to above
analysis.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/core.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Jeff Johnson April 22, 2024, 5:52 p.m. UTC | #1
On 4/11/2024 11:06 PM, Baochen Qiang wrote:
> Currently when resume ath12k_core_restart() calls
> ath12k_core_pre_reconfigure_recovery() where mac80211 queues are
> stopped by calling ieee80211_stop_queues(). Then in
> ath12k_mac_op_reconfig_complete() those queues are not started
> because ieee80211_wake_queues() is skipped due to the check on
> reconfig_type. The result is that mac80211
> could not deliver any frame to ath12k to send out, finally making
> connection fail.
> 
> [84473.104249] PM: suspend exit
> [84479.372397] wlan0: no VHT 160 MHz capability on 5 GHz, limiting to 80 MHz
> [84479.372401] wlan0: determined local STA to be EHT, BW limited to 80 MHz
> [84479.372416] wlan0: determined AP 00:03:7f:12:b7:b7 to be HE
> [84479.372420] wlan0: connecting with HE mode, max bandwidth 80 MHz
> [84479.580348] wlan0: authenticate with 00:03:7f:12:b7:b7 (local address=00:03:7f:37:11:53)
> [84479.580351] wlan0: send auth to 00:03:7f:12:b7:b7 (try 1/3)
> [84480.698993] wlan0: send auth to 00:03:7f:12:b7:b7 (try 2/3)
> [84481.816505] wlan0: send auth to 00:03:7f:12:b7:b7 (try 3/3)
> [84482.810966] wlan0: authentication with 00:03:7f:12:b7:b7 timed out
> 
> Actually we don't need to stop/start queues during suspend/resume,
> so remove ath12k_core_pre_reconfigure_recovery() from ath12k_core_restart().
> This won't cause any regression because currently the only chance
> ath12k_core_restart() gets called is in reset case, where ab->is_reset
> is set so that function will never be executed.
> 
> Also remove ath12k_core_post_reconfigure_recovery() because it is
> not needed in suspend/resume case. This is also valid due to above
> analysis.
> 
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
index aeb7f9e43cc4..380a3c8f7201 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -1045,9 +1045,6 @@  static void ath12k_core_restart(struct work_struct *work)
 	struct ath12k_base *ab = container_of(work, struct ath12k_base, restart_work);
 	int ret;
 
-	if (!ab->is_reset)
-		ath12k_core_pre_reconfigure_recovery(ab);
-
 	ret = ath12k_core_reconfigure_on_crash(ab);
 	if (ret) {
 		ath12k_err(ab, "failed to reconfigure driver on crash recovery\n");
@@ -1056,9 +1053,6 @@  static void ath12k_core_restart(struct work_struct *work)
 
 	if (ab->is_reset)
 		complete_all(&ab->reconfigure_complete);
-
-	if (!ab->is_reset)
-		ath12k_core_post_reconfigure_recovery(ab);
 }
 
 static void ath12k_core_reset(struct work_struct *work)