Skip to content

Commit e53f8b1

Browse files
Ramya Gnanasekarjmberg-intel
authored andcommitted
wifi: mac80211: Fix 6 GHz Band capabilities element advertisement in lower bands
Currently, when adding the 6 GHz Band Capabilities element, the channel list of the wiphy is checked to determine if 6 GHz is supported for a given virtual interface. However, in a multi-radio wiphy (e.g., one that has both lower bands and 6 GHz combined), the wiphy advertises support for all bands. As a result, the 6 GHz Band Capabilities element is incorrectly included in mesh beacon and station's association request frames of interfaces operating in lower bands, without verifying whether the interface is actually operating in a 6 GHz channel. Fix this by verifying if the interface operates on 6 GHz channel before adding the element. Note that this check cannot be placed directly in ieee80211_put_he_6ghz_cap() as the same function is used to add probe request elements while initiating scan in which case the interface may not be operating in any band's channel. Signed-off-by: Ramya Gnanasekar <[email protected]> Signed-off-by: Rameshkumar Sundaram <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 7a7458e commit e53f8b1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

net/mac80211/mesh.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,9 @@ int mesh_add_he_6ghz_cap_ie(struct ieee80211_sub_if_data *sdata,
624624
if (!sband)
625625
return -EINVAL;
626626

627+
if (sband->band != NL80211_BAND_6GHZ)
628+
return 0;
629+
627630
iftd = ieee80211_get_sband_iftype_data(sband,
628631
NL80211_IFTYPE_MESH_POINT);
629632
/* The device doesn't support HE in mesh mode or at all */

net/mac80211/mlme.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,8 @@ ieee80211_add_link_elems(struct ieee80211_sub_if_data *sdata,
18421842
ieee80211_put_he_cap(skb, sdata, sband,
18431843
&assoc_data->link[link_id].conn);
18441844
ADD_PRESENT_EXT_ELEM(WLAN_EID_EXT_HE_CAPABILITY);
1845-
ieee80211_put_he_6ghz_cap(skb, sdata, smps_mode);
1845+
if (sband->band == NL80211_BAND_6GHZ)
1846+
ieee80211_put_he_6ghz_cap(skb, sdata, smps_mode);
18461847
}
18471848

18481849
/*

0 commit comments

Comments
 (0)