summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/realtek
diff options
context:
space:
mode:
authorChih-Kang Chang <gary.chang@realtek.com>2023-04-15 05:48:55 +0200
committerKalle Valo <kvalo@kernel.org>2023-04-17 11:49:51 +0200
commite579e943bac3b52f69a25738fcbd8be945f72689 (patch)
tree1d2474280410e83a1e1ba6ea624bb142e7edab7d /drivers/net/wireless/realtek
parentwifi: rtw89: coex: send more hardware module info to firmware for 8851B (diff)
downloadlinux-e579e943bac3b52f69a25738fcbd8be945f72689.tar.xz
linux-e579e943bac3b52f69a25738fcbd8be945f72689.zip
wifi: rtw89: prohibit enter IPS during HW scan
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 <gary.chang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230415034900.15679-2-pkshih@realtek.com
Diffstat (limited to '')
-rw-r--r--drivers/net/wireless/realtek/rtw89/mac80211.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
index b059aa8d88db..b5cbfc15ebad 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);