Skip to contentSkip to conversation

doc: document DisableHT AP setting

PATCH In review James Prestwood 2 participants 3 messages Feb 24, 2023 – Feb 27, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 doc: document DisableHT AP setting

---
 src/iwd.ap.rst | 5 +++++
 1 file changed, 5 insertions(+)
src/iwd.ap.rst +5 -0
index 0763b442..9ad002a2 100644
@@ -73,6 +73,11 @@ The group ``[General]`` contains general AP configuration.
        The time interval at which the AP starts a rekey for a given station. If
        not provided a default value of 0 is used (rekeying is disabled).
 
+   * - DisableHT
+     - Boolean value
+
+       Explicitly disable HT capabilities for this AP.
+
 Network Authentication Settings
 -------------------------------
 
Signature · 1 line
2.34.3
#1 lore raw

PATCH 2/2 ap: add DisableHT setting

This allows the user to disable HT explicitly in the AP profile

---
 src/ap.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
src/ap.c +12 -1
index b51befe4..2867e1ab 100644
@@ -3660,7 +3660,18 @@ static int ap_load_config(struct ap_state *ap, const struct l_settings *config,
 		ap->band = BAND_FREQ_2_4_GHZ;
 	}
 
-	ap->supports_ht = wiphy_get_ht_capabilities(wiphy, ap->band,
+	if (l_settings_has_key(config, "General", "DisableHT")) {
+		bool boolval;
+
+		if (!l_settings_get_bool(config, "General", "DisableHT",
+						&boolval)) {
+			l_error("AP [General].DisableHT not a valid boolean");
+			return -EINVAL;
+		}
+
+		ap->supports_ht = !boolval;
+	} else
+		ap->supports_ht = wiphy_get_ht_capabilities(wiphy, ap->band,
 							NULL) != NULL;
 
 	if (!ap_validate_band_channel(ap)) {
Signature · 1 line
2.34.3