[PATCH] AP: Fix setting MLD parameters subfield in RNR element

Andrei Otcheretianski andrei.otcheretianski at intel.com
Tue Dec 12 08:56:31 PST 2023


From: Ilan Peer <ilan.peer at intel.com>

In case the TBTT information is reporting about an AP in the same
AP MLD as the current AP, the MLD ID in the MLD parameters should
be set to 0.
While at it, remove spurious \tab char in hostapd_eid_rnr()

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 src/ap/ieee802_11.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index e85b0635f3..2a271b3ef6 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7586,7 +7586,11 @@ static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
 				len += RNR_TBTT_INFO_LEN;
 			} else {
 #ifdef CONFIG_IEEE80211BE
-				*eid++ = hapd->conf->mld_id;
+				if (bss->conf->mld_id == reporting_hapd->conf->mld_id)
+					*eid++ = 0;
+				else
+					*eid++ = hapd->conf->mld_id;
+
 				*eid++ = hapd->mld_link_id | (1 << 4);
 				*eid++ = 0;
 				len += RNR_TBTT_INFO_MLD_LEN;
@@ -7670,7 +7674,7 @@ u8 * hostapd_eid_rnr(struct hostapd_data *hapd, u8 *eid, u32 type)
 
 	case WLAN_FC_STYPE_ACTION:
 		if (hapd->iface->num_bss > 1 && mode == STANDALONE_6GHZ)
-			eid = hostapd_eid_rnr_iface(hapd, hapd,	eid,
+			eid = hostapd_eid_rnr_iface(hapd, hapd, eid,
 						    &current_len, NULL);
 		break;
 
-- 
2.38.1




More information about the Hostap mailing list