[PATCH v3 01/11] mbssid: add new configuration option
Aloka Dixit
quic_alokad at quicinc.com
Wed May 11 14:15:11 PDT 2022
From: John Crispin <john at phrozen.org>
Add configuration option 'mbssid' used to enable multiple BSSID (MBSSID)
and enhanced multiple BSSID advertisements (EMA) features. Add macros for
the valid values.
Reject the configuration if any of the BSSes have hidden SSID enabled.
Signed-off-by: John Crispin <john at phrozen.org>
Co-developed-by: Aloka Dixit <quic_alokad at quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad at quicinc.com>
---
hostapd/config_file.c | 9 +++++++
hostapd/hostapd.conf | 58 +++++++++++++++++++++++++++++++++++++++++++
src/ap/ap_config.c | 6 +++++
src/ap/ap_config.h | 4 +++
4 files changed, 77 insertions(+)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 8a86ce08bae4..64ef8729bde2 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3629,6 +3629,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
}
bss->unsol_bcast_probe_resp_interval = val;
+ } else if (os_strcmp(buf, "mbssid") == 0) {
+ int mbssid = atoi(pos);
+ if (mbssid < 0 || mbssid > ENHANCED_MBSSID_ENABLED) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: invalid mbssid (%d): '%s'.",
+ line, mbssid, pos);
+ return 1;
+ }
+ conf->mbssid = mbssid;
#endif /* CONFIG_IEEE80211AX */
} else if (os_strcmp(buf, "max_listen_interval") == 0) {
bss->max_listen_interval = atoi(pos);
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index f37d5634b1b5..868b5a8f5fec 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -3106,3 +3106,61 @@ own_ip_addr=127.0.0.1
#bss=wlan0_1
#bssid=00:13:10:95:fe:0b
# ...
+#
+# Multiple BSSID Advertisement in 802.11ax
+# IEEE Std 802.11ax-2021 added a feature where instead of multiple interfaces
+# on a common radio transmitting individual beacons, those can form a set with
+# a common beacon is transmitted for all. The interface which is brought up
+# first is called as the transmitting profile of the MBSSID set which transmits
+# the beacons. The remaining interfaces are called as the non-transmitting
+# profiles and these are advertised inside the multiple BSSID element in the
+# beacons and probe response frames.
+# The transmitting interface is visible to all clients in the vicinity, however
+# the clients which do not support parsing of the multiple BSSID element will
+# not be able to connect to the non-transmitting interfaces.
+#
+# Enhanced Multiple BSSID Advertisements (EMA)
+# When enabled, the non-transmitting interfaces are split into multiple
+# beacons. The number of beacons required to cover all the non-transmitting
+# profiles is called as the profile periodicity.
+#
+# Refer to IEEE Std 802.11-2020 for details regarding the procedure and
+# required MAC address assignment.
+#
+# Following configuration is per radio.
+# 0 = Disabled (Default)
+# 1 = Multiple BSSID advertisements enabled.
+# 2 = Enhanced multiple BSSID advertisements enabled.
+#mbssid=0
+#
+# The transmitting interface should be added with 'interface' option while
+# the non-transmitting interfaces should be added using 'bss' option.
+# Security configuration should be added separately per interface, if required.
+#
+# Example:
+#mbssid=2
+#interface=wlan2
+#ctrl_interface=/var/run/hostapd
+#wpa_passphrase=0123456789
+#ieee80211w=2
+#sae_pwe=1
+#auth_algs=1
+#wpa=2
+#wpa_pairwise=CCMP
+#ssid=<SSID-0>
+#bridge=br-lan
+#wpa_key_mgmt=SAE
+#bssid=00:03:7f:12:84:84
+#
+#bss=wlan2-1
+#ctrl_interface=/var/run/hostapd
+#wpa_passphrase=0123456789
+#ieee80211w=2
+#sae_pwe=1
+#auth_algs=1
+#wpa=2
+#wpa_pairwise=CCMP
+#ssid=<SSID-1>
+#bridge=br-lan
+#wpa_key_mgmt=SAE
+#bssid=00:03:7f:12:84:85
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
index 1c229c6c78ae..5947927d09fa 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -1447,6 +1447,12 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
}
#endif /* CONFIG_IEEE80211BE */
+ if (full_config && bss->ignore_broadcast_ssid && conf->mbssid) {
+ wpa_printf(MSG_ERROR,
+ "Hidden SSID is not suppored when MBSSID is enabled");
+ return -1;
+ }
+
return 0;
}
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 805ea93df731..d09b5f85990d 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1139,6 +1139,10 @@ struct hostapd_config {
#define CH_SWITCH_EHT_ENABLED BIT(0)
#define CH_SWITCH_EHT_DISABLED BIT(1)
unsigned int ch_switch_eht_config;
+
+#define MBSSID_ENABLED 1
+#define ENHANCED_MBSSID_ENABLED 2
+ u8 mbssid;
};
--
2.31.1
More information about the Hostap
mailing list