blob: e35a423e7a6eff417b78cac5714fe61cdd5afdce [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 933e864265735dd4b668f13cced18e18b789b41c Mon Sep 17 00:00:00 2001
2From: "MeiChia.Chiu" <MeiChia.Chiu@mediatek.com>
3Date: Mon, 3 Jun 2024 14:29:24 +0800
4Subject: [PATCH 098/126] mtk: hostapd: Fix the issue with the presence of
5 MLD_ID in the probe response
6
7The probe response carries the MLD_ID value only
8when mld_id is not 0 (e.g., NonTxBSS).
9
10Signed-off-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
11Signed-off-by: Money Wang <money.wang@mediatek.com>
12Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
13---
14 src/ap/ieee802_11_eht.c | 7 ++++---
15 1 file changed, 4 insertions(+), 3 deletions(-)
16
17diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c
18index 02e85194c..8fc239f36 100644
19--- a/src/ap/ieee802_11_eht.c
20+++ b/src/ap/ieee802_11_eht.c
21@@ -480,7 +480,7 @@ static u8 * hostapd_eid_eht_basic_ml_common(struct hostapd_data *hapd,
22 if (hapd->iconf->eml_disable)
23 common_info_len -= 2; /* EML Capabilities (2) */
24
25- if (include_mld_id) {
26+ if (include_mld_id && hostapd_get_mld_id(hapd)) {
27 /* AP MLD ID */
28 control |= BASIC_MULTI_LINK_CTRL_PRES_AP_MLD_ID;
29 common_info_len++;
30@@ -526,7 +526,7 @@ static u8 * hostapd_eid_eht_basic_ml_common(struct hostapd_data *hapd,
31 mld_cap);
32 wpabuf_put_le16(buf, mld_cap);
33
34- if (include_mld_id) {
35+ if (include_mld_id && hostapd_get_mld_id(hapd)) {
36 wpa_printf(MSG_DEBUG, "MLD: AP MLD ID=0x%x",
37 hostapd_get_mld_id(hapd));
38 wpabuf_put_u8(buf, hostapd_get_mld_id(hapd));
39@@ -820,7 +820,8 @@ size_t hostapd_eid_eht_ml_beacon_len(struct hostapd_data *hapd,
40 struct mld_info *info,
41 bool include_mld_id)
42 {
43- return hostapd_eid_eht_ml_len(info, include_mld_id,
44+ return hostapd_eid_eht_ml_len(info,
45+ include_mld_id && hostapd_get_mld_id(hapd),
46 hapd->iconf->eml_disable);
47 }
48
49--
502.18.0
51