From a6b2007c2fd9adb455c27185221493fc01a8327b Mon Sep 17 00:00:00 2001 From: Ben Greear Date: Wed, 10 Mar 2021 09:27:54 -0800 Subject: [PATCH] nl80211: Support disabling HE in infrastructure BSS as station Send a flag to the kernel when user has specified disable_he=1 in the network configuration block. This extends the functionality added in commit 7c8f540ee0a8 ("wpa_supplicant: Add HE override support") to cover the cases that need kernel functionality. Signed-off-by: Ben Greear --- src/drivers/driver_nl80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index df12941e1..c2721ae37 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -5888,6 +5888,14 @@ static int nl80211_ht_vht_overrides(struct nl_msg *msg, } #endif /* CONFIG_VHT_OVERRIDES */ +#ifdef CONFIG_HE_OVERRIDES + if (params->disable_he) { + wpa_printf(MSG_DEBUG, " * HE disabled"); + if (nla_put_flag(msg, NL80211_ATTR_DISABLE_HE)) + return -1; + } +#endif /* CONFIG_HE_OVERRIDES */ + return 0; }