blob: c27e065fbd3346781f10fd6d8055509c76c04804 [file] [log] [blame]
developer66e89bc2024-04-23 14:50:01 +08001From a5c0e5c09398a247236d73078a4f86a960a97e34 Mon Sep 17 00:00:00 2001
2From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Mon, 8 Apr 2024 16:27:51 +0800
4Subject: [PATCH 099/104] fixup! mtk: wifi: hostapd: add wds mlo support
5
6The latest get_hapd_bssid return hapd only if link id is matched.
7However,the hostapd_rx_from_unknown_sta does not have link
8information so it cannot get hapd.
9
10Modify get_hapd_bssid to ignore link id when link id is -1.
11
12Without this patch, wds mode cannot work and the AP would not be
13aware that station is using 4 address.
14
developer66e89bc2024-04-23 14:50:01 +080015Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
developer66e89bc2024-04-23 14:50:01 +080016---
17 src/ap/drv_callbacks.c | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
21index 27c7555a1..82973c5e4 100644
22--- a/src/ap/drv_callbacks.c
23+++ b/src/ap/drv_callbacks.c
24@@ -1779,7 +1779,7 @@ static struct hostapd_data * get_hapd_bssid(struct hostapd_iface *iface,
25 if (ether_addr_equal(bssid, hapd->own_addr) ||
26 (hapd->conf->mld_ap &&
27 ether_addr_equal(bssid, hapd->mld->mld_addr) &&
28- link_id == hapd->mld_link_id)) {
29+ (link_id == hapd->mld_link_id || link_id == -1))) {
30 return hapd;
31 } else if (hapd->conf->mld_ap) {
32 for_each_mld_link(p_hapd, hapd) {
33@@ -1788,7 +1788,7 @@ static struct hostapd_data * get_hapd_bssid(struct hostapd_iface *iface,
34
35 if (ether_addr_equal(bssid, p_hapd->own_addr) ||
36 (ether_addr_equal(bssid, p_hapd->mld->mld_addr) &&
37- link_id == p_hapd->mld_link_id))
38+ (link_id == p_hapd->mld_link_id || link_id == -1)))
39 return p_hapd;
40 }
41 }
42--
432.39.2
44