Commit 31846b65 authored by Ilan Peer's avatar Ilan Peer Committed by Johannes Berg

cfg80211: add NO-EHT flag to regulatory

This may be necessary in some cases, add a flag and propagate
it, just like the NO-HE that already exists.
Signed-off-by: default avatarIlan Peer <ilan.peer@intel.com>
[split off from a combined 320/no-EHT patch]
Link: https://lore.kernel.org/r/20220214173004.dbb85a7b86bb.Ifc1e2daac51c1cc5f895ccfb79faf5eaec3950ec@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c2b3d769
...@@ -114,6 +114,7 @@ struct wiphy; ...@@ -114,6 +114,7 @@ struct wiphy;
* channel as the control or any of the secondary channels. * channel as the control or any of the secondary channels.
* This may be due to the driver or due to regulatory bandwidth * This may be due to the driver or due to regulatory bandwidth
* restrictions. * restrictions.
* @IEEE80211_CHAN_NO_EHT: EHT operation is not permitted on this channel.
*/ */
enum ieee80211_channel_flags { enum ieee80211_channel_flags {
IEEE80211_CHAN_DISABLED = 1<<0, IEEE80211_CHAN_DISABLED = 1<<0,
...@@ -136,6 +137,7 @@ enum ieee80211_channel_flags { ...@@ -136,6 +137,7 @@ enum ieee80211_channel_flags {
IEEE80211_CHAN_8MHZ = 1<<17, IEEE80211_CHAN_8MHZ = 1<<17,
IEEE80211_CHAN_16MHZ = 1<<18, IEEE80211_CHAN_16MHZ = 1<<18,
IEEE80211_CHAN_NO_320MHZ = 1<<19, IEEE80211_CHAN_NO_320MHZ = 1<<19,
IEEE80211_CHAN_NO_EHT = 1<<20,
}; };
#define IEEE80211_CHAN_NO_HT40 \ #define IEEE80211_CHAN_NO_HT40 \
......
...@@ -3999,6 +3999,8 @@ enum nl80211_wmm_rule { ...@@ -3999,6 +3999,8 @@ enum nl80211_wmm_rule {
* on this channel in current regulatory domain. * on this channel in current regulatory domain.
* @NL80211_FREQUENCY_ATTR_NO_320MHZ: any 320 MHz channel using this channel * @NL80211_FREQUENCY_ATTR_NO_320MHZ: any 320 MHz channel using this channel
* as the primary or any of the secondary channels isn't possible * as the primary or any of the secondary channels isn't possible
* @NL80211_FREQUENCY_ATTR_NO_EHT: EHT operation is not allowed on this channel
* in current regulatory domain.
* @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
* currently defined * currently defined
* @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
...@@ -4036,6 +4038,7 @@ enum nl80211_frequency_attr { ...@@ -4036,6 +4038,7 @@ enum nl80211_frequency_attr {
NL80211_FREQUENCY_ATTR_8MHZ, NL80211_FREQUENCY_ATTR_8MHZ,
NL80211_FREQUENCY_ATTR_16MHZ, NL80211_FREQUENCY_ATTR_16MHZ,
NL80211_FREQUENCY_ATTR_NO_320MHZ, NL80211_FREQUENCY_ATTR_NO_320MHZ,
NL80211_FREQUENCY_ATTR_NO_EHT,
/* keep last */ /* keep last */
__NL80211_FREQUENCY_ATTR_AFTER_LAST, __NL80211_FREQUENCY_ATTR_AFTER_LAST,
......
...@@ -1159,6 +1159,9 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy, ...@@ -1159,6 +1159,9 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy,
if ((chan->flags & IEEE80211_CHAN_NO_320MHZ) && if ((chan->flags & IEEE80211_CHAN_NO_320MHZ) &&
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_320MHZ)) nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_320MHZ))
goto nla_put_failure; goto nla_put_failure;
if ((chan->flags & IEEE80211_CHAN_NO_EHT) &&
nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_EHT))
goto nla_put_failure;
} }
if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER, if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment