]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: cfg80211: Do not create BSS entries for unsupported channels
authorChenming Huang <quic_chenhuan@quicinc.com>
Mon, 23 Sep 2024 02:16:44 +0000 (07:46 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 8 Oct 2024 19:15:51 +0000 (21:15 +0200)
commite1a9ae3a73810c00e492485fdbae09f0dccb057e
tree3397991336d4ce8f4d0780aa956edaa2c4f0b9a9
parent8dd0498983eef524a8d104eb8abb32ec4c595bec
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 <quic_chenhuan@quicinc.com>
Link: https://patch.msgid.link/20240923021644.12885-1-quic_chenhuan@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c