developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame^] | 1 | From a5c0e5c09398a247236d73078a4f86a960a97e34 Mon Sep 17 00:00:00 2001 |
| 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Mon, 8 Apr 2024 16:27:51 +0800 |
| 4 | Subject: [PATCH 099/104] fixup! mtk: wifi: hostapd: add wds mlo support |
| 5 | |
| 6 | The latest get_hapd_bssid return hapd only if link id is matched. |
| 7 | However,the hostapd_rx_from_unknown_sta does not have link |
| 8 | information so it cannot get hapd. |
| 9 | |
| 10 | Modify get_hapd_bssid to ignore link id when link id is -1. |
| 11 | |
| 12 | Without this patch, wds mode cannot work and the AP would not be |
| 13 | aware that station is using 4 address. |
| 14 | |
| 15 | CR-Id: WCNCR00240772 |
| 16 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 17 | Change-Id: I9661226ed0847abb1de0d8c808daf3ad8cd5dc99 |
| 18 | --- |
| 19 | src/ap/drv_callbacks.c | 4 ++-- |
| 20 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 21 | |
| 22 | diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c |
| 23 | index 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 | -- |
| 45 | 2.39.2 |
| 46 | |