Message ID | 20250606104436.326654-1-rameshkumar.sundaram@oss.qualcomm.com |
---|---|
State | New |
Headers | show |
Series | [wireless-next] wifi: mac80211: Fix 6 GHz Band capabilities element advertisement in lower bands | expand |
On Fri, 2025-06-06 at 16:14 +0530, Rameshkumar Sundaram wrote: > From: Ramya Gnanasekar <ramya.gnanasekar@oss.qualcomm.com> > > 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. > This is not incorrect. johannes
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 5cc56d578048..d10f9e7f0ea2 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -624,6 +624,9 @@ int mesh_add_he_6ghz_cap_ie(struct ieee80211_sub_if_data *sdata, if (!sband) return -EINVAL; + if (sband->band != NL80211_BAND_6GHZ) + return 0; + iftd = ieee80211_get_sband_iftype_data(sband, NL80211_IFTYPE_MESH_POINT); /* The device doesn't support HE in mesh mode or at all */ diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index b84150dbfe8c..47b3a559073e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1802,7 +1802,8 @@ ieee80211_add_link_elems(struct ieee80211_sub_if_data *sdata, ieee80211_put_he_cap(skb, sdata, sband, &assoc_data->link[link_id].conn); ADD_PRESENT_EXT_ELEM(WLAN_EID_EXT_HE_CAPABILITY); - ieee80211_put_he_6ghz_cap(skb, sdata, smps_mode); + if (sband->band == NL80211_BAND_6GHZ) + ieee80211_put_he_6ghz_cap(skb, sdata, smps_mode); } /*