[PATCH 3/4] AP: Add testing option to indicate an AP is disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ilan Peer <ilan.peer@xxxxxxxxx>

Add a testing configuration such that the AP would be reported
as disabled in the RNR TBTT information MLD parameters included
by other APs in the AP MLD.

Signed-off-by: Ilan Peer <ilan.peer@xxxxxxxxx>
---
 hostapd/config_file.c | 4 ++++
 src/ap/ap_config.h    | 8 ++++++++
 src/ap/ieee802_11.c   | 8 +++++++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 1a49292b11..0d5f24c25b 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -4790,6 +4790,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
 				   line);
 			return 1;
 		}
+#ifdef CONFIG_TESTING_OPTIONS
+	} else if (os_strcmp(buf, "mld_indicate_disabled") == 0) {
+		bss->mld_indicate_disabled = atoi(pos);
+#endif /* CONFIG_TESTING_OPTIONS */
 #endif /* CONFIG_IEEE80211BE */
 	} else {
 		wpa_printf(MSG_ERROR,
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 0bc799d3e7..b402b58478 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -948,6 +948,14 @@ struct hostapd_bss_config {
 
 	/* The AP's MLD MAC address within the AP MLD */
 	u8 mld_addr[ETH_ALEN];
+
+#ifdef CONFIG_TESTING_OPTIONS
+	/*
+	 * If set indicate the AP as disabled in the RNR element included in the
+	 * other APs in the AP MLD
+	 */
+	u8 mld_indicate_disabled;
+#endif /* CONFIG_TESTING_OPTIONS */
 #endif /* CONFIG_IEEE80211BE */
 };
 
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index a65287d77e..afc955c4bc 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7600,7 +7600,13 @@ static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
 					*eid++ = hapd->conf->mld_id;
 
 				*eid++ = hapd->mld_link_id | (1 << 4);
-				*eid++ = 0;
+				*eid = 0;
+#ifdef CONFIG_TESTING_OPTIONS
+				if (hapd->conf->mld_indicate_disabled)
+					*eid |= RNR_TBTT_INFO_MLD_PARAM2_LINK_DISABLED;
+#endif /* CONFIG_TESTING_OPTIONS */
+				eid++;
+
 				len += RNR_TBTT_INFO_MLD_LEN;
 #endif /* CONFIG_IEEE80211BE */
 			}
-- 
2.43.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux