mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
wifi: rtw89: improve scan time on 6 GHz band
Reduce scan time for all supported channels from 4.4s to 3.5s. If NL80211_SCAN_FLAG_COLOCATED_6GHZ is set in scan request, only scan PSC channels and the channels from the RNR element found on the 2.4/5 GHz channels. When firmware support parsing RNR element from received beacon or probe response, offload the decision about non-PSC channels to firmware. Driver do not need to fill non-PSC channels to scan list. If NL80211_SCAN_FLAG_COLOCATED_6GHZ is not set, scan all supported channels. Signed-off-by: Jui-Peng Tsai <emma_tsai@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20251021133402.15467-9-pkshih@realtek.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
e139b1c1f0
commit
a62b654125
@@ -7787,15 +7787,23 @@ int rtw89_hw_scan_prep_chan_list_be(struct rtw89_dev *rtwdev,
|
||||
struct ieee80211_channel *channel;
|
||||
struct list_head chan_list;
|
||||
enum rtw89_chan_type type;
|
||||
bool chan_by_rnr;
|
||||
bool random_seq;
|
||||
int ret;
|
||||
u32 idx;
|
||||
|
||||
random_seq = !!(req->flags & NL80211_SCAN_FLAG_RANDOM_SN);
|
||||
chan_by_rnr = rtwdev->chip->support_rnr &&
|
||||
(req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ);
|
||||
INIT_LIST_HEAD(&chan_list);
|
||||
|
||||
for (idx = 0; idx < req->n_channels; idx++) {
|
||||
channel = req->channels[idx];
|
||||
|
||||
if (channel->band == NL80211_BAND_6GHZ &&
|
||||
!cfg80211_channel_is_psc(channel) && chan_by_rnr)
|
||||
continue;
|
||||
|
||||
ch_info = kzalloc(sizeof(*ch_info), GFP_KERNEL);
|
||||
if (!ch_info) {
|
||||
ret = -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user