blob: a63f81af2e5b5587103fd6f3319334b814bed262 [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
15CR-Id: WCNCR00240772
16Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
17Change-Id: I9661226ed0847abb1de0d8c808daf3ad8cd5dc99
18---
19 src/ap/drv_callbacks.c | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
23index 27c7555a1..82973c5e4 100644
24--- a/src/ap/drv_callbacks.c
25+++ b/src/ap/drv_callbacks.c
26@@ -1779,7 +1779,7 @@ static struct hostapd_data * get_hapd_bssid(struct hostapd_iface *iface,
27 if (ether_addr_equal(bssid, hapd->own_addr) ||
28 (hapd->conf->mld_ap &&
29 ether_addr_equal(bssid, hapd->mld->mld_addr) &&
30- link_id == hapd->mld_link_id)) {
31+ (link_id == hapd->mld_link_id || link_id == -1))) {
32 return hapd;
33 } else if (hapd->conf->mld_ap) {
34 for_each_mld_link(p_hapd, hapd) {
35@@ -1788,7 +1788,7 @@ static struct hostapd_data * get_hapd_bssid(struct hostapd_iface *iface,
36
37 if (ether_addr_equal(bssid, p_hapd->own_addr) ||
38 (ether_addr_equal(bssid, p_hapd->mld->mld_addr) &&
39- link_id == p_hapd->mld_link_id))
40+ (link_id == p_hapd->mld_link_id || link_id == -1)))
41 return p_hapd;
42 }
43 }
44--
452.39.2
46