blob: e8adbc04097888814f2f121476c630004db8397f [file] [log] [blame]
developer66e89bc2024-04-23 14:50:01 +08001From ec1fdb73853632e9a9003f8c59620d1e12f6d2d0 Mon Sep 17 00:00:00 2001
2From: Sriram R <quic_srirrama@quicinc.com>
3Date: Thu, 28 Mar 2024 23:46:35 +0530
4Subject: [PATCH 005/104] hostapd: MLO: handle auth/assoc on link address
5
6Modify authentication and association frames to be always sent with link
7address as A1 and A3 for ease of Tx status handling.
8
9Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
10Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
11---
12 src/ap/ieee802_11.c | 25 ++-----------------------
13 1 file changed, 2 insertions(+), 23 deletions(-)
14
15diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
16index 5a3132de4..b20300bab 100644
17--- a/src/ap/ieee802_11.c
18+++ b/src/ap/ieee802_11.c
19@@ -416,14 +416,7 @@ static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta,
20 struct wpabuf *ml_resp = NULL;
21
22 #ifdef CONFIG_IEEE80211BE
23- /*
24- * Once a non-AP MLD is added to the driver, the addressing should use
25- * the MLD MAC address. Thus, use the MLD address instead of translating
26- * the addresses.
27- */
28 if (ap_sta_is_mld(hapd, sta)) {
29- sa = hapd->mld->mld_addr;
30-
31 ml_resp = hostapd_ml_auth_resp(hapd);
32 if (!ml_resp)
33 return -1;
34@@ -444,7 +437,7 @@ static int send_auth_reply(struct hostapd_data *hapd, struct sta_info *sta,
35 WLAN_FC_STYPE_AUTH);
36 os_memcpy(reply->da, dst, ETH_ALEN);
37 os_memcpy(reply->sa, sa, ETH_ALEN);
38- os_memcpy(reply->bssid, bssid, ETH_ALEN);
39+ os_memcpy(reply->bssid, sa, ETH_ALEN);
40
41 reply->u.auth.auth_alg = host_to_le16(auth_alg);
42 reply->u.auth.auth_transaction = host_to_le16(auth_transaction);
43@@ -3265,14 +3258,9 @@ static void handle_auth(struct hostapd_data *hapd,
44 bssid = mgmt->bssid;
45
46 #ifdef CONFIG_IEEE80211BE
47- /*
48- * Once a non-AP MLD is added to the driver, the addressing should use
49- * the MLD MAC address. It is the responsibility of the driver to
50- * handle the translations.
51- */
52 if (ap_sta_is_mld(hapd, sta)) {
53 dst = sta->addr;
54- bssid = hapd->mld->mld_addr;
55+ bssid = hapd->own_addr;
56 }
57 #endif /* CONFIG_IEEE80211BE */
58
59@@ -4823,15 +4811,6 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
60 (reassoc ? WLAN_FC_STYPE_REASSOC_RESP :
61 WLAN_FC_STYPE_ASSOC_RESP));
62
63-#ifdef CONFIG_IEEE80211BE
64- /*
65- * Once a non-AP MLD is added to the driver, the addressing should use
66- * MLD MAC address.
67- */
68- if (ap_sta_is_mld(hapd, sta) && allow_mld_addr_trans)
69- sa = hapd->mld->mld_addr;
70-#endif /* CONFIG_IEEE80211BE */
71-
72 os_memcpy(reply->da, addr, ETH_ALEN);
73 os_memcpy(reply->sa, sa, ETH_ALEN);
74 os_memcpy(reply->bssid, sa, ETH_ALEN);
75--
762.39.2
77