diff options
author | Thomas Pedersen <thomas@adapt-ip.com> | 2020-06-02 09:22:47 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-07-31 10:24:13 +0300 |
commit | df78a0c0b67de58934877aad61e0431a2bd0caf1 (patch) | |
tree | ee856ca0f49728ac2c5985e27e9897612cbf31f0 /net/wireless/util.c | |
parent | 41d707b7332f1386642c47eb078110ca368a46f5 (diff) | |
download | linux-df78a0c0b67de58934877aad61e0431a2bd0caf1.tar.xz |
nl80211: S1G band and channel definitions
Gives drivers the definitions needed to advertise support
for S1G bands.
Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
Link: https://lore.kernel.org/r/20200602062247.23212-1-thomas@adapt-ip.com
Link: https://lore.kernel.org/r/20200731055636.795173-1-thomas@adapt-ip.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 4d3b76f94f55..26a977343c3b 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -102,6 +102,8 @@ u32 ieee80211_channel_to_freq_khz(int chan, enum nl80211_band band) if (chan < 7) return MHZ_TO_KHZ(56160 + chan * 2160); break; + case NL80211_BAND_S1GHZ: + return 902000 + chan * 500; default: ; } @@ -210,6 +212,12 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband) WARN_ON(!sband->ht_cap.ht_supported); WARN_ON((sband->ht_cap.mcs.rx_mask[0] & 0x1e) != 0x1e); break; + case NL80211_BAND_S1GHZ: + /* Figure 9-589bd: 3 means unsupported, so != 3 means at least + * mandatory is ok. + */ + WARN_ON((sband->s1g_cap.nss_mcs[0] & 0x3) == 0x3); + break; case NUM_NL80211_BANDS: default: WARN_ON(1); |