diff mbox series

[1/3] wifi: rtw89: advertise missing extended scan feature

Message ID 20240222064258.59782-2-pkshih@realtek.com (mailing list archive)
State Accepted
Commit dc10daddfeb1252e9fd170da086ac2d43f8f7272
Delegated to: Kalle Valo
Headers show
Series wifi: rtw89: update scan features, EHT beamforming capability and PCI setting | expand

Commit Message

Ping-Ke Shih Feb. 22, 2024, 6:42 a.m. UTC
From: Kuan-Chung Chen <damon.chen@realtek.com>

Add support for random serial number in probe request and
configure channel dwell time. Advertise corresponding feature flag
NL80211_EXT_FEATURE_SCAN_RANDOM_SN and NL80211_EXT_FEATURE_SET_SCAN_DWELL.
Use the scan request duration as channel dwell time when it is
non-zero, otherwise use the default value.

Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtw89/core.c | 2 ++
 drivers/net/wireless/realtek/rtw89/fw.c   | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Kalle Valo Feb. 27, 2024, 2:55 p.m. UTC | #1
Ping-Ke Shih <pkshih@realtek.com> wrote:

> From: Kuan-Chung Chen <damon.chen@realtek.com>
> 
> Add support for random serial number in probe request and
> configure channel dwell time. Advertise corresponding feature flag
> NL80211_EXT_FEATURE_SCAN_RANDOM_SN and NL80211_EXT_FEATURE_SET_SCAN_DWELL.
> Use the scan request duration as channel dwell time when it is
> non-zero, otherwise use the default value.
> 
> Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

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

dc10daddfeb1 wifi: rtw89: advertise missing extended scan feature
6ebe995542d0 wifi: rtw89: Update EHT PHY beamforming capability
53fe234f15b9 wifi: rtw89: pci: implement PCI CLK/ASPM/L1SS for WiFi 7 chips
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index f697e3d898e6..d4bca8cd08f2 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -4505,6 +4505,8 @@  static int rtw89_core_register_hw(struct rtw89_dev *rtwdev)
 	hw->wiphy->max_remain_on_channel_duration = 1000;
 
 	wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0);
+	wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_SCAN_RANDOM_SN);
+	wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_SET_SCAN_DWELL);
 
 	ret = rtw89_core_set_supported_band(rtwdev);
 	if (ret) {
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 63897351ca15..f654ad4c2546 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -5739,7 +5739,7 @@  int rtw89_hw_scan_add_chan_list(struct rtw89_dev *rtwdev,
 			goto out;
 		}
 
-		if (req->duration_mandatory)
+		if (req->duration)
 			ch_info->period = req->duration;
 		else if (channel->band == NL80211_BAND_6GHZ)
 			ch_info->period = RTW89_CHANNEL_TIME_6G +
@@ -5817,7 +5817,7 @@  int rtw89_hw_scan_add_chan_list_be(struct rtw89_dev *rtwdev,
 			goto out;
 		}
 
-		if (req->duration_mandatory)
+		if (req->duration)
 			ch_info->period = req->duration;
 		else if (channel->band == NL80211_BAND_6GHZ)
 			ch_info->period = RTW89_CHANNEL_TIME_6G + RTW89_DWELL_TIME_6G;