From 49bf9f2df95ad7d6624f20deed39da8ef0a09ef0 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 10 Aug 2023 11:34:41 +0300 Subject: [PATCH] wlantest: Use the MLD MAC address as well for matching STA entries Allow either a link address or the MLD MAC address of a non-AP MLD to match the MAC address that is being used to identify a source or destination of a frame for the MLO cases. Signed-off-by: Jouni Malinen --- wlantest/sta.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wlantest/sta.c b/wlantest/sta.c index 6a5412e54..f3a538fef 100644 --- a/wlantest/sta.c +++ b/wlantest/sta.c @@ -38,6 +38,8 @@ struct wlantest_sta * sta_find_mlo(struct wlantest *wt, dl_list_for_each(sta, &bss->sta, struct wlantest_sta, list) { if (os_memcmp(sta->addr, addr, ETH_ALEN) == 0) return sta; + if (os_memcmp(sta->mld_mac_addr, addr, ETH_ALEN) == 0) + return sta; } if (is_zero_ether_addr(addr)) @@ -61,6 +63,8 @@ struct wlantest_sta * sta_find_mlo(struct wlantest *wt, dl_list_for_each(sta, &obss->sta, struct wlantest_sta, list) { if (os_memcmp(sta->addr, addr, ETH_ALEN) == 0) return sta; + if (os_memcmp(sta->mld_mac_addr, addr, ETH_ALEN) == 0) + return sta; for (link_id = 0; link_id < MAX_NUM_MLO_LINKS; link_id++) { if (os_memcmp(sta->link_addr[link_id], addr,