From de2411c71cdf2c0442c9196831b9efe33d9a6eb6 Mon Sep 17 00:00:00 2001 From: Luke Wang Date: Wed, 31 Jul 2024 17:17:03 +0800 Subject: [PATCH] avoid WiFi cannot connect to AP after suspend resume WCSWREL-621: woal_sdio_suspend() may be called before complete cfg80211_disconnect(), which causes WiFi cannot connect to AP after suspend resume. Add delay to wait kernel complete cfg80211_disconnect() as a workaround. Signed-off-by: Luke Wang --- mlinux/moal_sdio_mmc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mlinux/moal_sdio_mmc.c b/mlinux/moal_sdio_mmc.c index 94b3741..151816d 100644 --- a/mlinux/moal_sdio_mmc.c +++ b/mlinux/moal_sdio_mmc.c @@ -825,6 +825,9 @@ int woal_sdio_suspend(struct device *dev) #ifdef MMC_PM_FUNC_SUSPENDED handle->suspend_notify_req = MTRUE; #endif + /* add delay to wait kernel complete cfg80211_disconnect*/ + woal_sched_timeout(200); + hs_actived = woal_enable_hs( woal_get_priv(handle, MLAN_BSS_ROLE_ANY)); #ifdef MMC_PM_FUNC_SUSPENDED