diff mbox series

[43/50] WPA_AUTH: MLO: Get the correct AA and SPA based on MLD operation

Message ID 20230215230904.933291-44-andrei.otcheretianski@intel.com
State Changes Requested
Headers show
Series Add basic MLO support for AP | expand

Commit Message

Andrei Otcheretianski Feb. 15, 2023, 11:08 p.m. UTC
From: Ilan Peer <ilan.peer@intel.com>

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 src/ap/wpa_auth.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
index 3f64561d0b..ee1be2782d 100644
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -37,13 +37,15 @@ 
 
 static const u8 *wpa_auth_get_aa(struct wpa_state_machine *sm)
 {
-	return sm->wpa_auth->addr;
+	return (sm && sm->mld_assoc_link_id >= 0) ?
+		sm->own_mld_addr : sm->wpa_auth->addr;
 }
 
 
 static const u8 *wpa_auth_get_spa(struct wpa_state_machine *sm)
 {
-	return sm->addr;
+	return sm->mld_assoc_link_id >= 0 ?
+		sm->peer_mld_addr : sm->addr;
 }