Skip to content

Commit e1a9ae3

Browse files
Chenming Huangjmberg-intel
authored andcommitted
wifi: cfg80211: Do not create BSS entries for unsupported channels
Currently, in cfg80211_parse_ml_elem_sta_data(), when RNR element indicates a BSS that operates in a channel that current regulatory domain doesn't support, a NULL value is returned by ieee80211_get_channel_khz() and assigned to this BSS entry's channel field. Later in cfg80211_inform_single_bss_data(), the reported BSS entry's channel will be wrongly overridden by transmitted BSS's. This could result in connection failure that when wpa_supplicant tries to select this reported BSS entry while it actually resides in an unsupported channel. Since this channel is not supported, it is reasonable to skip such entries instead of reporting wrong information. Signed-off-by: Chenming Huang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 8dd0498 commit e1a9ae3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/wireless/scan.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3050,6 +3050,10 @@ cfg80211_parse_ml_elem_sta_data(struct wiphy *wiphy,
30503050
freq = ieee80211_channel_to_freq_khz(ap_info->channel, band);
30513051
data.channel = ieee80211_get_channel_khz(wiphy, freq);
30523052

3053+
/* Skip if RNR element specifies an unsupported channel */
3054+
if (!data.channel)
3055+
continue;
3056+
30533057
/* Skip if BSS entry generated from MBSSID or DIRECT source
30543058
* frame data available already.
30553059
*/

0 commit comments

Comments
 (0)