* [PATCH 1/2] doc: document DisableHT AP setting
@ 2023-02-24 0:57 James Prestwood
2023-02-24 0:57 ` [PATCH 2/2] ap: add DisableHT setting James Prestwood
2023-02-27 16:27 ` [PATCH 1/2] doc: document DisableHT AP setting Denis Kenzior
0 siblings, 2 replies; 3+ messages in thread
From: James Prestwood @ 2023-02-24 0:57 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
---
src/iwd.ap.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/iwd.ap.rst b/src/iwd.ap.rst
index 0763b442..9ad002a2 100644
--- a/src/iwd.ap.rst
+++ b/src/iwd.ap.rst
@@ -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
-------------------------------
--
2.34.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ap: add DisableHT setting
2023-02-24 0:57 [PATCH 1/2] doc: document DisableHT AP setting James Prestwood
@ 2023-02-24 0:57 ` James Prestwood
2023-02-27 16:27 ` [PATCH 1/2] doc: document DisableHT AP setting Denis Kenzior
1 sibling, 0 replies; 3+ messages in thread
From: James Prestwood @ 2023-02-24 0:57 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
This allows the user to disable HT explicitly in the AP profile
---
src/ap.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/ap.c b/src/ap.c
index b51befe4..2867e1ab 100644
--- 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)) {
--
2.34.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] doc: document DisableHT AP setting
2023-02-24 0:57 [PATCH 1/2] doc: document DisableHT AP setting James Prestwood
2023-02-24 0:57 ` [PATCH 2/2] ap: add DisableHT setting James Prestwood
@ 2023-02-27 16:27 ` Denis Kenzior
1 sibling, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2023-02-27 16:27 UTC (permalink / raw)
To: James Prestwood, iwd
Hi James,
On 2/23/23 18:57, James Prestwood wrote:
> ---
> src/iwd.ap.rst | 5 +++++
> 1 file changed, 5 insertions(+)
>
Both applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-27 16:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-24 0:57 [PATCH 1/2] doc: document DisableHT AP setting James Prestwood
2023-02-24 0:57 ` [PATCH 2/2] ap: add DisableHT setting James Prestwood
2023-02-27 16:27 ` [PATCH 1/2] doc: document DisableHT AP setting Denis Kenzior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).