From bf38d2943072ad6e3f1fb252c449970b9d0cfeb0 Mon Sep 17 00:00:00 2001 From: TeamCorePro Date: Thu, 14 Aug 2025 16:23:29 +0800 Subject: [PATCH] report connect reject msg when multi vap conflict Signed-off-by: TeamCorePro --- .../src/common/ieee802_11_defs.h | 3 +++ .../wpa_supplicant/wpa_supplicant.c | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/wpa_supplicant-2.9_standard/src/common/ieee802_11_defs.h b/wpa_supplicant-2.9_standard/src/common/ieee802_11_defs.h index 5b9cc0e..213741f 100644 --- a/wpa_supplicant-2.9_standard/src/common/ieee802_11_defs.h +++ b/wpa_supplicant-2.9_standard/src/common/ieee802_11_defs.h @@ -120,6 +120,9 @@ #define WLAN_CAPABILITY_IMM_BLOCK_ACK BIT(15) /* Status codes (IEEE Std 802.11-2020, 9.4.1.9, Table 9-50) */ +#ifdef CONFIG_OPEN_HARMONY_PATCH +#define WLAN_STATUS_EXT_DRIVER_FAIL -1 +#endif #define WLAN_STATUS_SUCCESS 0 #define WLAN_STATUS_UNSPECIFIED_FAILURE 1 #define WLAN_STATUS_TDLS_WAKEUP_ALTERNATE 2 diff --git a/wpa_supplicant-2.9_standard/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant-2.9_standard/wpa_supplicant/wpa_supplicant.c index 1408690..86dcdc6 100644 --- a/wpa_supplicant-2.9_standard/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant-2.9_standard/wpa_supplicant/wpa_supplicant.c @@ -4849,6 +4849,13 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) */ wpas_connection_failed(wpa_s, wpa_s->pending_bssid, NULL); +#ifdef CONFIG_OPEN_HARMONY_PATCH + struct WpaAssociateRejectParam wpaAssociateRejectParma; + os_memcpy(wpaAssociateRejectParma.bssid, wpa_s->pending_bssid, ETH_ALEN); + wpaAssociateRejectParma.statusCode = WLAN_STATUS_EXT_DRIVER_FAIL; + wpaAssociateRejectParma.timeOut = 0; + WpaEventReport(wpa_s->ifname, WPA_EVENT_ASSOCIATE_REJECT, (void *) &wpaAssociateRejectParma); +#endif wpa_supplicant_set_state(wpa_s, WPA_DISCONNECTED); #ifdef CONFIG_P2P_CHR wpa_supplicant_upload_p2p_state(wpa_s, @@ -4856,6 +4863,9 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) DR_TRIGGER_ASSOCIATE_TO_DRV_FAIL, ret); #endif os_memset(wpa_s->pending_bssid, 0, ETH_ALEN); +#ifdef CONFIG_OPEN_HARMONY_PATCH + wpas_connect_work_done(wpa_s); +#endif return; } /* try to continue anyway; new association will be tried again -- Gitee