diff options
| author | Lachlan Hodges <lachlan.hodges@morsemicro.com> | 2026-01-13 14:09:34 +1100 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-01-13 10:44:26 +0100 |
| commit | 24a57985670e9dac5547e5b7731bf8e7b03d5be8 (patch) | |
| tree | 1e3214a0636c166dc68375453fd1e74694543573 /net/wireless | |
| parent | 669aa3e3faa8ae876c169cde5b234828275caef8 (diff) | |
| download | linux-next-24a57985670e9dac5547e5b7731bf8e7b03d5be8.tar.gz linux-next-24a57985670e9dac5547e5b7731bf8e7b03d5be8.zip | |
wifi: cfg80211: don't apply HT flags to S1G channels
HT flags don't really make sense when applied to S1G channels
especially given the bandwidths both used for calculations and
conveyed (i.e 20MHz). Similarly with the 80/160/..MHz channels,
each bonded subchannel is validated individually within
cfg80211_s1g_usable(), so the regulatory validation is similarly
redundant. Additionally, usermode application output (such as iwinfo
below) doesn't particularly make sense when enumerating S1G channels:
before:
925.500 MHz (Band: 900 MHz, Channel 47) [NO_HT40+, NO_HT40-, NO_16MHZ]
926.500 MHz (Band: 900 MHz, Channel 49) [NO_HT40+, NO_HT40-, NO_16MHZ]
927.500 MHz (Band: 900 MHz, Channel 51) [NO_HT40+, NO_HT40-, NO_16MHZ, NO_PRIMARY]
after:
925.500 MHz (Band: 900 MHz, Channel 47) [NO_16MHZ]
926.500 MHz (Band: 900 MHz, Channel 49) [NO_16MHZ]
927.500 MHz (Band: 900 MHz, Channel 51) [NO_16MHZ, NO_PRIMARY]
Don't process the S1G band when applying HT flags as both the regulatory
component is redundant and the flags don't make sense for S1G channels.
Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Link: https://patch.msgid.link/20260113030934.18726-1-lachlan.hodges@morsemicro.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
| -rw-r--r-- | net/wireless/reg.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index a8ab0ab22d90..6cbfa3b78311 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2332,8 +2332,17 @@ static void reg_process_ht_flags(struct wiphy *wiphy) if (!wiphy) return; - for (band = 0; band < NUM_NL80211_BANDS; band++) + for (band = 0; band < NUM_NL80211_BANDS; band++) { + /* + * Don't apply HT flags to channels within the S1G band. + * Each bonded channel will instead be validated individually + * within cfg80211_s1g_usable(). + */ + if (band == NL80211_BAND_S1GHZ) + continue; + reg_process_ht_flags_band(wiphy, wiphy->bands[band]); + } } static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev) |
