wlan-ap-Telecominfraproject/feeds/ipq95xx/hostapd/patches/q02-053-wpa_supplicant-set-interface-state-as-inactive-if-me.patch
John Crispin b9b03a6e38 ipq95xx: add Qualcomm wifi-7 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00

46 lines
1.5 KiB
Diff

From 462d1e11d742a496d169e4724f6925794f0d7e03 Mon Sep 17 00:00:00 2001
From: Hari Chandrakanthan <quic_haric@quicinc.com>
Date: Thu, 13 Oct 2022 03:35:10 +0530
Subject: [PATCH] wpa_supplicant : set interface state as inactive if mesh
bringup fails
In the current design, when mesh + ap is brought up,
mesh is brought up first and then ap is brought up.
There are cases where mesh bring up can fail.
Eg : mesh configured with acs.
wpa_supplicant doesn't support acs with mesh.
So mesh bring up fails which is expected.
The interface state is still maintained
as SCANNING even if mesh bring bring-up fails.
Since ap bringup depends on mesh bringup and mesh interface state
doesnot reflect the correct state during bringup failure, the ap bring
up is not initiated and that leads to the issue where ap interface remains
disabled.
So make the interface state as INACTIVE if the mesh bring up fails.
Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
---
wpa_supplicant/wpa_supplicant.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index b9b5bdf..c19ec33 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2307,6 +2307,7 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
ssid->frequency = bss->freq;
if (wpa_supplicant_join_mesh(wpa_s, ssid) < 0) {
wpa_msg(wpa_s, MSG_ERROR, "Could not join mesh");
+ wpa_supplicant_set_state(wpa_s, WPA_INACTIVE);
return;
}
wpa_s->current_bss = bss;
--
2.7.4