]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mbssid: Add MBSSID Configuration element
authorAloka Dixit <quic_alokad@quicinc.com>
Thu, 1 Dec 2022 03:18:40 +0000 (19:18 -0800)
committerJouni Malinen <j@w1.fi>
Fri, 2 Dec 2022 18:37:33 +0000 (20:37 +0200)
Add Multiple BSSID Configuration element data per IEEE Std
802.11ax-2021, 9.4.2.260 when enhanced multiple BSSID advertisement
(EMA) is enabled. This element informs the stations about the EMA
profile periodicity of the multiple BSSID set.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
src/ap/beacon.c
src/common/ieee802_11_defs.h

index 36e32e1423c18af7767eb6e955b225e5345459d8..97c126923258467c4b9472cf2864c2eb3f4605ca 100644 (file)
@@ -512,6 +512,23 @@ fail:
 }
 
 
+static u8 * hostapd_eid_mbssid_config(struct hostapd_data *hapd, u8 *eid,
+                                     u8 mbssid_elem_count)
+{
+       struct hostapd_iface *iface = hapd->iface;
+
+       if (iface->conf->mbssid == ENHANCED_MBSSID_ENABLED) {
+               *eid++ = WLAN_EID_EXTENSION;
+               *eid++ = 3;
+               *eid++ = WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION;
+               *eid++ = iface->num_bss;
+               *eid++ = mbssid_elem_count;
+       }
+
+       return eid;
+}
+
+
 static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
                                   const struct ieee80211_mgmt *req,
                                   int is_p2p, size_t *resp_len,
@@ -1635,6 +1652,9 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
        }
 #endif /* CONFIG_IEEE80211BE */
 
+       if (hapd->iconf->mbssid == ENHANCED_MBSSID_ENABLED &&
+           hapd == hostapd_mbssid_get_tx_bss(hapd))
+               tail_len += 5; /* Multiple BSSID Configuration element */
        tail_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_BEACON);
        tail_len += hostapd_mbo_ie_len(hapd);
        tail_len += hostapd_eid_owe_trans_len(hapd);
@@ -1774,6 +1794,8 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
        tailpos = hostapd_eid_rnr(hapd, tailpos, WLAN_FC_STYPE_BEACON);
        tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0);
        tailpos = hostapd_get_rsnxe(hapd, tailpos, tailend - tailpos);
+       tailpos = hostapd_eid_mbssid_config(hapd, tailpos,
+                                           params->mbssid_elem_count);
 
 #ifdef CONFIG_IEEE80211AX
        if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) {
index ed0051e7bb02abcbd7b8a7e12e9d73797567123e..59c3b6a8364b3e51b24e5684e7d66aac2077907b 100644 (file)
 #define WLAN_EID_EXT_SPATIAL_REUSE 39
 #define WLAN_EID_EXT_COLOR_CHANGE_ANNOUNCEMENT 42
 #define WLAN_EID_EXT_OCV_OCI 54
+#define WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION 55
 #define WLAN_EID_EXT_NON_INHERITANCE 56
 #define WLAN_EID_EXT_SHORT_SSID_LIST 58
 #define WLAN_EID_EXT_HE_6GHZ_BAND_CAP 59