Files
wlan-ap/feeds/morse/utils/wpa_supplicant_s1g/patches/0002-SW-11943-dpp-does-not-associate-in-us-regd.patch
ian77_chen f39339564a mediatek-sdk: Support HaLow on EAP112
1. porting MorseMicro HaLow driver to support HaLow on EAP112
2. Only support FCC regulation because of hardware limitation
3. Add /etc/init.d/halow-gpio-reset to initialize HaLow chip in early stage
4. Add /etc/uci-defaults/aaa-fix-phy0-to-morse to correct the default uci for HaLow radio.

Signed-off-by: Ian Chen <ian77_chen@accton.com>
2025-05-12 10:45:38 +02:00

91 lines
3.4 KiB
Diff

From 25631fa387af430b8d7f03302218c66dc161cc6f Mon Sep 17 00:00:00 2001
From: Andrew Pope <andrew.pope@morsemicro.com>
Date: Tue, 4 Jun 2024 23:12:37 +0000
Subject: [PATCH] Merged in SW-11943-dpp-does-not-associate-in-us-regdom (pull
request #213)
SW-11943: DPP does not associate in US regdom
Two problems contributed to the originally reported issue:
1. The DPP-PB state machine function will unconditionally cancel any pending off-channel actions - even if the DPP PB discovery phase is over. To fix this, avoid unconditionally completing offchannel actions from DPP-PB state machine function if DPP PB discovery phase is over.
2. Logic around PKEX retries will manually attempt to complete the exchange on adjacent non-S1G channels. These retries inevitably fail, leading to a quicker collapse of the PKEX exchange attempts and eventual downgrade from v2 to v1 (bad). To fix this, remove non-S1G frequency hopping logic from DPP PB discovery and PKEX exchange phases.
Approved-by: Neville Young
Approved-by: Simon Wadsworth
Approved-by: Ayman Grais
Approved-by: James Herbert
---
src/ap/dpp_hostapd.c | 6 ++++++
wpa_supplicant/dpp_supplicant.c | 17 +++++++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index b7cca47c7..282581fe5 100644
--- a/src/ap/dpp_hostapd.c
+++ b/src/ap/dpp_hostapd.c
@@ -260,6 +260,12 @@ static int hostapd_dpp_allow_ir(struct hostapd_data *hapd, unsigned int freq)
static int hostapd_dpp_pkex_next_channel(struct hostapd_data *hapd,
struct dpp_pkex *pkex)
{
+ /* Following logic is not S1G compatible. Attempting PKEX on non-adjacent S1G channels
+ * results in guaranteed failure.
+ */
+ if (hapd->iconf->ieee80211ah)
+ return -1;
+
if (pkex->freq == 2437)
pkex->freq = 5745;
else if (pkex->freq == 5745)
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index ab06ff8d3..e90e4a163 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -2840,6 +2840,12 @@ static int wpas_dpp_allow_ir(struct wpa_supplicant *wpa_s, unsigned int freq)
static int wpas_dpp_pkex_next_channel(struct wpa_supplicant *wpa_s,
struct dpp_pkex *pkex)
{
+#if defined(CONFIG_IEEE80211AH)
+ /* Following logic is not S1G compatible. Attempting PKEX on non-adjacent S1G channels
+ * results in guaranteed failure.
+ */
+ return -1;
+#endif
if (pkex->freq == 2437)
pkex->freq = 5745;
else if (pkex->freq == 5745)
@@ -5113,10 +5119,16 @@ static int * wpas_dpp_presence_ann_channels(struct wpa_supplicant *wpa_s,
if (chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_RADAR))
continue;
+#if defined(CONFIG_IEEE80211AH)
+ /* Adding channels 44 and 149 at end of scan list is not required
+ * for HaLow
+ */
+#else
if (chan->freq == 5220)
chan44 = 1;
if (chan->freq == 5745)
chan149 = 1;
+#endif
/* Morse - All 5GHz channels that are mapped to 1 MHz and 2 MHz.
* Channels that aren't relevant to a regulatory domain will be
@@ -5573,9 +5585,10 @@ static void wpas_dpp_pb_next(void *eloop_ctx, void *timeout_ctx)
if (!wpa_s->dpp_pb_freqs)
return;
- os_get_reltime(&now);
- offchannel_send_action_done(wpa_s);
+ if (!wpa_s->dpp_pb_discovery_done)
+ offchannel_send_action_done(wpa_s);
+ os_get_reltime(&now);
if (os_reltime_expired(&now, &wpa_s->dpp_pb_time, 100)) {
wpa_printf(MSG_DEBUG, "DPP: Push button wait time expired");
wpas_dpp_push_button_stop(wpa_s);
--
2.25.1