From: Johannes Berg The regulatory connectivity element is informational and for debug, per spec, but that didn't stop some situations/tests from requiring certain bits to be set, notably the SP bit to be set if any channel is available for AFC client behaviour, even if that seems to reduce the utility of the bit. Set the bit accordingly by initialising the flags to NO_AFC and then masking for all enabled channels. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- net/mac80211/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 9e1749d2e427..44feb80274c6 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2731,13 +2731,13 @@ int ieee80211_put_he_cap(struct sk_buff *skb, void ieee80211_put_reg_conn(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) { + u32 flags = IEEE80211_CHAN_NO_6GHZ_AFC_CLIENT; struct ieee80211_local *local = sdata->local; u8 reg_conn = IEEE80211_REG_CONN_LPI_VALID | IEEE80211_REG_CONN_LPI_VALUE | IEEE80211_REG_CONN_SP_VALID; struct ieee80211_supported_band *sband; bool available_channels = false; - u32 flags = 0; int i; sband = local->hw.wiphy->bands[NL80211_BAND_6GHZ]; @@ -2747,7 +2747,7 @@ void ieee80211_put_reg_conn(struct ieee80211_sub_if_data *sdata, for (i = 0; i < sband->n_channels; i++) { if (sband->channels[i].flags & IEEE80211_CHAN_DISABLED) continue; - flags |= sband->channels[i].flags; + flags &= sband->channels[i].flags; available_channels = true; } -- 2.34.1