mac80211: support disabling EHT mode
authorMuna Sinada <quic_msinada@quicinc.com>
Wed, 23 Mar 2022 22:46:36 +0000 (15:46 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 4 May 2022 20:50:03 +0000 (22:50 +0200)
Allow userspace to disable EHT mode.
This forces EHT capable interfaces to disable during association.

Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Link: https://lore.kernel.org/r/20220323224636.20211-2-quic_alokad@quicinc.com
[remove stray message change]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index b857915881e09042ef02843479549240cff4aa5f..f02137b4cb12eec2d3ef6b07c4aa49d21c2190ce 100644 (file)
@@ -6126,6 +6126,9 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
                ifmgd->flags |= IEEE80211_STA_DISABLE_EHT;
        }
 
+       if (req->flags & ASSOC_REQ_DISABLE_EHT)
+               ifmgd->flags |= IEEE80211_STA_DISABLE_EHT;
+
        err = ieee80211_prep_connection(sdata, req->bss, true, override);
        if (err)
                goto err_clear;