]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Add testing option to indicate an AP is disabled
authorIlan Peer <ilan.peer@intel.com>
Thu, 21 Dec 2023 11:08:22 +0000 (13:08 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 22 Dec 2023 14:01:40 +0000 (16:01 +0200)
Add a testing configuration such that the AP would be reported as
disabled in the RNR TBTT information MLD parameters included by other
affiliated APs of the AP MLD.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
hostapd/config_file.c
src/ap/ap_config.h
src/ap/ieee802_11.c

index af324bb2540849bc1ee144096d8116b434b88cf7..b1b7350df7d32b8d761e1174cdde394a0c9c88ba 100644 (file)
@@ -4853,6 +4853,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
        } else if (os_strcmp(buf, "eht_oper_puncturing_override") == 0) {
                if (get_u16(pos, line, &bss->eht_oper_puncturing_override))
                        return 1;
+       } else if (os_strcmp(buf, "mld_indicate_disabled") == 0) {
+               bss->mld_indicate_disabled = atoi(pos);
 #endif /* CONFIG_TESTING_OPTIONS */
 #endif /* CONFIG_IEEE80211BE */
        } else {
index 5bf41b43896d6edeb7aa867de2097ec390c08abd..794b48b827d2867bed1728d3d45c29aef7399699 100644 (file)
@@ -952,6 +952,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.
+        */
+       bool mld_indicate_disabled;
+#endif /* CONFIG_TESTING_OPTIONS */
 #endif /* CONFIG_IEEE80211BE */
 };
 
index 597a5df3c41bbef56a6d39dc8bf804c7d8093665..ffe167f90b479a6d1dcc5d3fa8c01b565824ebce 100644 (file)
@@ -7604,7 +7604,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 */
                        }