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 | |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 15 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 16 | --- |
| 17 | src/ap/drv_callbacks.c | 4 ++-- |
| 18 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 19 | |
| 20 | diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c |
| 21 | index 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 | -- |
| 43 | 2.39.2 |
| 44 | |