From e99dd80c8a183561de891a2cceb5a2bbcf64c88f Mon Sep 17 00:00:00 2001 From: Chin-Yen Lee Date: Mon, 5 Aug 2024 17:00:27 +0800 Subject: wifi: rtw89: wow: add delay option for net-detect The delay option is the period in unit of second for WoWLAN firmware to wait before the first scan. We get the option from cfg80211 and practice it. Another, in some platform, WoWLAN firmware may found configured network and then trigger resume process, before suspend process is completed, lead to the wakeup function failed. So the default value is set one to avoid the issue. Signed-off-by: Chin-Yen Lee Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20240805090028.27768-5-pkshih@realtek.com --- drivers/net/wireless/realtek/rtw89/wow.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/net/wireless/realtek/rtw89/wow.c') diff --git a/drivers/net/wireless/realtek/rtw89/wow.c b/drivers/net/wireless/realtek/rtw89/wow.c index 3bf563998ddf..0f0f4beec4d9 100644 --- a/drivers/net/wireless/realtek/rtw89/wow.c +++ b/drivers/net/wireless/realtek/rtw89/wow.c @@ -1458,6 +1458,8 @@ static int rtw89_pno_scan_offload(struct rtw89_dev *rtwdev, bool enable) opt.enable = enable; opt.repeat = RTW89_SCAN_NORMAL; opt.norm_pd = 10; /* in unit of 100ms */ + opt.delay = max(rtw_wow->nd_config->delay, 1); + if (rtwdev->chip->chip_gen == RTW89_CHIP_BE) { opt.operation = enable ? RTW89_SCAN_OP_START : RTW89_SCAN_OP_STOP; opt.scan_mode = RTW89_SCAN_MODE_SA; -- cgit