summaryrefslogtreecommitdiff
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2021-02-04 17:46:10 +0300
committerJohannes Berg <johannes.berg@intel.com>2021-02-12 11:33:34 +0300
commitb6db0f899a16a23f5a9ea6c8b0fafc7bbd38e03d (patch)
tree5fe68a9517d3d8f1b4ed8270e5060d850a3d5305 /net/wireless/nl80211.c
parent549fdd34b5f2dfa63e10855f20796c13a036707b (diff)
downloadlinux-b6db0f899a16a23f5a9ea6c8b0fafc7bbd38e03d.tar.xz
cfg80211/mac80211: Support disabling HE mode
Allow user to disable HE mode, similar to how VHT and HT can be disabled. Useful for testing. Signed-off-by: Ben Greear <greearb@candelatech.com> Link: https://lore.kernel.org/r/20210204144610.25971-1-greearb@candelatech.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 3b45a9593e71..521d36bb0803 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -752,6 +752,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
NL80211_SAE_PWE_BOTH),
[NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT },
[NL80211_ATTR_SAR_SPEC] = NLA_POLICY_NESTED(sar_policy),
+ [NL80211_ATTR_DISABLE_HE] = { .type = NLA_FLAG },
};
/* policy for the key attributes */
@@ -10019,6 +10020,9 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
if (nla_get_flag(info->attrs[NL80211_ATTR_DISABLE_VHT]))
req.flags |= ASSOC_REQ_DISABLE_VHT;
+ if (nla_get_flag(info->attrs[NL80211_ATTR_DISABLE_HE]))
+ req.flags |= ASSOC_REQ_DISABLE_HE;
+
if (info->attrs[NL80211_ATTR_VHT_CAPABILITY_MASK])
memcpy(&req.vht_capa_mask,
nla_data(info->attrs[NL80211_ATTR_VHT_CAPABILITY_MASK]),
@@ -10802,6 +10806,9 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info)
if (nla_get_flag(info->attrs[NL80211_ATTR_DISABLE_VHT]))
connect.flags |= ASSOC_REQ_DISABLE_VHT;
+ if (nla_get_flag(info->attrs[NL80211_ATTR_DISABLE_HE]))
+ connect.flags |= ASSOC_REQ_DISABLE_HE;
+
if (info->attrs[NL80211_ATTR_VHT_CAPABILITY_MASK])
memcpy(&connect.vht_capa_mask,
nla_data(info->attrs[NL80211_ATTR_VHT_CAPABILITY_MASK]),