2023-04-15 03:51:41

by Ping-Ke Shih

[permalink] [raw]
Subject: [PATCH v2 1/6] wifi: rtw89: prohibit enter IPS during HW scan

From: Chih-Kang Chang <[email protected]>

Mac80211 core may ask driver to change to idle mode during HW scan,
then H2C command for HW scan will send failed since chip is in idle
mode. Therefore, We check the SCANNING flag before entering IPS to
prevent this behavior.

Signed-off-by: Chih-Kang Chang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
---
drivers/net/wireless/realtek/rtw89/mac80211.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
index b059aa8d88dbf..b5cbfc15ebad8 100644
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
@@ -105,7 +105,8 @@ static int rtw89_ops_config(struct ieee80211_hw *hw, u32 changed)
}

if ((changed & IEEE80211_CONF_CHANGE_IDLE) &&
- (hw->conf.flags & IEEE80211_CONF_IDLE))
+ (hw->conf.flags & IEEE80211_CONF_IDLE) &&
+ !rtwdev->scanning)
rtw89_enter_ips(rtwdev);

mutex_unlock(&rtwdev->mutex);
--
2.25.1


2023-04-17 09:59:02

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v2 1/6] wifi: rtw89: prohibit enter IPS during HW scan

Ping-Ke Shih <[email protected]> wrote:

> From: Chih-Kang Chang <[email protected]>
>
> Mac80211 core may ask driver to change to idle mode during HW scan,
> then H2C command for HW scan will send failed since chip is in idle
> mode. Therefore, We check the SCANNING flag before entering IPS to
> prevent this behavior.
>
> Signed-off-by: Chih-Kang Chang <[email protected]>
> Signed-off-by: Ping-Ke Shih <[email protected]>

6 patches applied to wireless-next.git, thanks.

e579e943bac3 wifi: rtw89: prohibit enter IPS during HW scan
e7399db231d0 wifi: rtw89: refine scan function after chanctx
8b048bd5ddf7 wifi: rtw89: use struct instead of macros to set H2C command of hardware scan
ac83f3809055 wifi: rtw89: update statistics to FW for fine-tuning performance
982a91642708 wifi: rtw89: Disallow power save with multiple stations
f22c0bffe8d9 wifi: rtw89: add support of concurrent mode

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches