[PATCH RFC 7/9] STA: add S1G support
Lachlan Hodges
lachlan.hodges at morsemicro.com
Thu Oct 8 20:32:04 PDT 2026
Introduce the ability to bring up an S1G STA. A sample config
to connect to the equivalent AP config is as follows:
```
update_config=1
country=US
pmf=2
network={
ssid="wifi_halow"
sae_password="12345678"
key_mgmt=SAE
}
```
Signed-off-by: Lachlan Hodges <lachlan.hodges at morsemicro.com>
---
wpa_supplicant/Makefile | 6 ++++++
wpa_supplicant/defconfig | 3 +++
wpa_supplicant/events.c | 13 +++++++------
wpa_supplicant/sme.c | 6 ++++++
wpa_supplicant/wpa_supplicant.c | 16 ++++++++++++++++
5 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 6de5ce571d92..46d1de4da4d4 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1088,6 +1088,9 @@ endif
ifdef CONFIG_IEEE80211BN
OBJS += ../src/ap/ieee802_11_uhr.o
endif
+ifdef CONFIG_IEEE80211AH
+OBJS += ../src/ap/ieee802_11_s1g.o
+endif
ifdef CONFIG_WNM_AP
CFLAGS += -DCONFIG_WNM_AP
OBJS += ../src/ap/wnm_ap.o
@@ -1125,6 +1128,9 @@ endif
ifdef CONFIG_IEEE80211AX
CFLAGS += -DCONFIG_IEEE80211AX
endif
+ifdef CONFIG_IEEE80211AH
+CFLAGS += -DCONFIG_IEEE80211AH
+endif
ifdef NEED_AP_MLME
OBJS += ../src/ap/wmm.o
diff --git a/wpa_supplicant/defconfig b/wpa_supplicant/defconfig
index 3ecd1e5f7631..bf55968d1166 100644
--- a/wpa_supplicant/defconfig
+++ b/wpa_supplicant/defconfig
@@ -716,3 +716,6 @@ CONFIG_DPP2=y
# Note: These features are experimental and still changing; do not enable for
# production use.
#CONFIG_PQC=y
+
+# IEEE 802.11ah (S1G) support for AP mode
+#CONFIG_IEEE80211AH=y
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 4f92fe039f42..9a4265b88edd 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1660,13 +1660,14 @@ static bool wpa_scan_res_ok(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
}
#ifdef CONFIG_SAE
- /* When using SAE Password Identifier and when operationg on the 6 GHz
- * band, only H2E is allowed. */
+ /* When using SAE Password Identifier and when operating on 6 GHz or
+ * S1G, only H2E is allowed. */
sae_pwe = wpas_get_ssid_sae_pwe(wpa_s, ssid);
- if ((sae_pwe == SAE_PWE_HASH_TO_ELEMENT ||
- wpa_key_mgmt_only_sae_ext_key(ssid->key_mgmt) ||
- is_6ghz_freq(bss->freq) || ssid->sae_password_id) &&
- sae_pwe != SAE_PWE_FORCE_HUNT_AND_PECK &&
+ if ((is_s1ghz_freq(bss->freq) ||
+ ((sae_pwe == SAE_PWE_HASH_TO_ELEMENT ||
+ wpa_key_mgmt_only_sae_ext_key(ssid->key_mgmt) ||
+ is_6ghz_freq(bss->freq) || ssid->sae_password_id) &&
+ sae_pwe != SAE_PWE_FORCE_HUNT_AND_PECK)) &&
wpa_key_mgmt_only_sae(ssid->key_mgmt) &&
!(rsnxe_capa & BIT(WLAN_RSNX_CAPAB_SAE_H2E))) {
if (debug_print)
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 8070b8b826fb..ef13f0d5f749 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -370,6 +370,12 @@ static struct wpabuf * sme_auth_build_sae_commit(struct wpa_supplicant *wpa_s,
if (wpa_s->sel_security_profile &&
wpa_key_mgmt_sae_ext_key(wpa_s->sel_security_profile->key_mgmt))
use_pt = 1;
+ if (bss && is_s1ghz_freq(bss->freq) &&
+ sae_pwe != SAE_PWE_HASH_TO_ELEMENT) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "SAE: Force H2E mode for S1G BSS");
+ sae_pwe = SAE_PWE_HASH_TO_ELEMENT;
+ }
#ifdef CONFIG_SAE_PK
if ((rsnxe_capa & BIT(WLAN_RSNX_CAPAB_SAE_PK)) &&
ssid->sae_pk != SAE_PK_MODE_DISABLED &&
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 71a099f9a4ed..f858c068de53 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2623,6 +2623,12 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
"RSN: Enable SAE hash-to-element mode for 6 GHz BSS");
sae_pwe = SAE_PWE_BOTH;
}
+ if (bss && is_s1ghz_freq(bss->freq) &&
+ sae_pwe != SAE_PWE_HASH_TO_ELEMENT) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "RSN: hunt-and-peck not permitted with an S1G BSS");
+ sae_pwe = SAE_PWE_HASH_TO_ELEMENT;
+ }
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_SAE_PWE, sae_pwe);
#ifdef CONFIG_SAE_PK
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_SAE_PK,
@@ -2640,6 +2646,12 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_MFP,
MGMT_FRAME_PROTECTION_REQUIRED);
}
+ if (bss && is_s1ghz_freq(bss->freq) &&
+ wpas_get_ssid_pmf(wpa_s, ssid) != MGMT_FRAME_PROTECTION_REQUIRED) {
+ wpa_dbg(wpa_s, MSG_DEBUG, "RSN: Force MFPR=1 on S1GHz");
+ wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_MFP,
+ MGMT_FRAME_PROTECTION_REQUIRED);
+ }
#ifdef CONFIG_TESTING_OPTIONS
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_FT_RSNXE_USED,
wpa_s->ft_rsnxe_used);
@@ -4142,6 +4154,7 @@ skip_80mhz:
.vht.enabled = freq->vht_enabled,
.he.enabled = freq->he_enabled,
.eht.enabled = freq->eht_enabled,
+ .s1g.enabled = freq->s1g_enabled,
.ht.sec_channel_offset = freq->sec_channel_offset,
.oper_chwidth = chwidth,
.center_segment0 = seg0,
@@ -5846,6 +5859,9 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
#ifdef CONFIG_SAE
params.sae_pwe = wpas_get_ssid_sae_pwe(wpa_s, ssid);
+ if (bss && is_s1ghz_freq(bss->freq) &&
+ params.sae_pwe != SAE_PWE_HASH_TO_ELEMENT)
+ params.sae_pwe = SAE_PWE_HASH_TO_ELEMENT;
#endif /* CONFIG_SAE */
params.security_profile_active = wpas_security_profile_active(wpa_s);
--
2.43.0
More information about the Hostap
mailing list