blob: 9519c2f3e3d78f0095c402b4dad3beaba6415e79 [file] [log] [blame]
From 1d64b54fc9ea3e53a6369e609a9b4e83e800a1e4 Mon Sep 17 00:00:00 2001
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
Date: Fri, 26 Apr 2024 08:36:57 +0800
Subject: [PATCH 081/126] mtk: hostapd: do not roam within the same MLD
If STA scaned and selected a different links from the same MLD AP, the
check by wpa_s would make it to roam within ESS, which is unnecessary
for a non-AP MLD.
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
---
wpa_supplicant/events.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 68f4d2dbe..83b1dcc21 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2395,6 +2395,9 @@ static int wpa_supplicant_need_to_roam(struct wpa_supplicant *wpa_s,
if (current_bss == selected)
return 0;
+ if (wpa_s->valid_links && ether_addr_equal(selected->mld_addr, wpa_s->bssid))
+ return 0; /* same AP MLD but different links */
+
if (selected->last_update_idx > current_bss->last_update_idx)
return 1; /* current BSS not seen in the last scan */
--
2.18.0