summary refs log tree commit diff
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorJohn Schoenick <johns@valvesoftware.com>2023-11-13 20:47:14 -0800
committerJohn Schoenick <johns@valvesoftware.com>2023-11-13 20:47:14 -0800
commitd418de2c82f22130b3411ca5334013fa9e2de31f (patch)
treef8d719d1d4724b24a4bcb0213cf92f430ae50655 /net/wireless/scan.c
parentb7dd868b5f57099d7f67810eb3acc58c3c108c07 (diff)
parentfd6db0236917ce0712065e82cf80d601d523abef (diff)
downloadlinux-6.1.52-valve5.tar.gz
Merge galilypad/6.1.52 into frog/6.1.52 6.1.52-valve5
Brings in galileo support
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r--net/wireless/scan.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index e5c1510c098f..3a759de0c525 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1876,9 +1876,7 @@ int cfg80211_get_ies_channel_number(const u8 *ie, size_t ielen,
 			if (!he_6ghz_oper)
 				return -1;
 
-			if (ftype != CFG80211_BSS_FTYPE_BEACON ||
-			    he_6ghz_oper->control & IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON)
-				return he_6ghz_oper->primary;
+			return he_6ghz_oper->primary;
 		}
 	} else if (band == NL80211_BAND_S1GHZ) {
 		tmp = cfg80211_find_elem(WLAN_EID_S1G_OPERATION, ie, ielen);
@@ -1934,22 +1932,21 @@ cfg80211_get_bss_channel(struct wiphy *wiphy, const u8 *ie, size_t ielen,
 	freq = ieee80211_channel_to_freq_khz(channel_number, channel->band);
 
 	/*
-	 * In 6GHz, duplicated beacon indication is relevant for
-	 * beacons only.
+	 * Frame info (beacon/prob res) is the same as received channel,
+	 * no need for further processing.
 	 */
-	if (channel->band == NL80211_BAND_6GHZ &&
-	    (freq == channel->center_freq ||
-	     abs(freq - channel->center_freq) > 80))
+	if (freq == ieee80211_channel_to_khz(channel))
 		return channel;
 
 	alt_channel = ieee80211_get_channel_khz(wiphy, freq);
 	if (!alt_channel) {
-		if (channel->band == NL80211_BAND_2GHZ) {
+		if (channel->band == NL80211_BAND_2GHZ ||
+		    channel->band == NL80211_BAND_6GHZ) {
 			/*
 			 * Better not allow unexpected channels when that could
 			 * be going beyond the 1-11 range (e.g., discovering
 			 * BSS on channel 12 when radio is configured for
-			 * channel 11.
+			 * channel 11) or beyond the 6 GHz channel range.
 			 */
 			return NULL;
 		}