commit c57071df657c893d2893e774a834ba0fc4416b53
parent 62c99d7c33e61ed3e3e2602d8f6b443ca66964c6
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 23 Feb 2023 16:57:23 -0800
ap: add DisableHT setting
This allows the user to disable HT explicitly in the AP profile
Diffstat:
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/ap.c b/src/ap.c
@@ -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)) {