History

nl80211: MBSSID and EMA support in AP mode

Add new attributes to configure support for multiple BSSID and advanced multi-BSSID advertisements (EMA) in AP mode. - NL80211_ATTR_MBSSID_CONFIG used for per interface configuration. - NL80211_ATTR_MBSSID_ELEMS used to MBSSID elements for beacons. Memory for the elements is allocated dynamically. This change frees the memory in existing functions which call nl80211_parse_beacon(), a comment is added to indicate the new references to do the same.

John Crispin committed 5 years ago

Commit dc1e3cb1 parent 05075fe3 files · +293 −5Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+75−1
@@ -360,7 +360,10 @@ · 359 unmodified lines
360360 * @NL80211_CMD_DEL_INTERFACE: Virtual interface was deleted, has attributes
361361 * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_WIPHY. Can also be sent from
362362 * userspace to request deletion of a virtual interface, then requires
363− * attribute %NL80211_ATTR_IFINDEX.
363+ * attribute %NL80211_ATTR_IFINDEX. If multiple BSSID advertisements are
364+ * enabled using %NL80211_ATTR_MBSSID_CONFIG, %NL80211_ATTR_MBSSID_ELEMS,
365+ * and if this command is used for the transmitting interface, then all
366+ * the non-transmitting interfaces are deleted as well.
364367 *
365368 * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified
366369 * by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC.
@@ -2624,6 +2627,18 @@ enum nl80211_commands { · 2257 unmodified lines
26242627 * @NL80211_ATTR_COLOR_CHANGE_ELEMS: Nested set of attributes containing the IE
26252628 * information for the time while performing a color switch.
26262629 *
2630+ * @NL80211_ATTR_MBSSID_CONFIG: Nested attribute for multiple BSSID
2631+ * advertisements (MBSSID) parameters in AP mode.
2632+ * Kernel uses this attribute to indicate the driver's support for MBSSID
2633+ * and enhanced multi-BSSID advertisements (EMA AP) to the userspace.
2634+ * Userspace should use this attribute to configure per interface MBSSID
2635+ * parameters.
2636+ * See &enum nl80211_mbssid_config_attributes for details.
2637+ *
2638+ * @NL80211_ATTR_MBSSID_ELEMS: Nested parameter to pass multiple BSSID elements.
2639+ * Mandatory parameter for the transmitting interface to enable MBSSID.
2640+ * Optional for the non-transmitting interfaces.
2641+ *
26272642 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
26282643 * @NL80211_ATTR_MAX: highest attribute number currently defined
26292644 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3127,6 +3142,9 @@ enum nl80211_attrs { · 497 unmodified lines
31273142 NL80211_ATTR_COLOR_CHANGE_COLOR,
31283143 NL80211_ATTR_COLOR_CHANGE_ELEMS,
31293144
3145+ NL80211_ATTR_MBSSID_CONFIG,
3146+ NL80211_ATTR_MBSSID_ELEMS,
3147+
31303148 /* add attributes here, update the policy in nl80211.c */
31313149
31323150 __NL80211_ATTR_AFTER_LAST,
@@ -7386,4 +7404,60 @@ enum nl80211_sar_specs_attrs { · 4253 unmodified lines
73867404 NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1,
73877405 };
73887406
7407+/**
7408+ * enum nl80211_mbssid_config_attributes - multiple BSSID (MBSSID) and enhanced
7409+ * multi-BSSID advertisements (EMA) in AP mode.
7410+ * Kernel uses some of these attributes to advertise driver's support for
7411+ * MBSSID and EMA.
7412+ * Remaining attributes should be used by the userspace to configure the
7413+ * features.
7414+ *
7415+ * @__NL80211_MBSSID_CONFIG_ATTR_INVALID: Invalid
7416+ *
7417+ * @NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES: Used by the kernel to advertise
7418+ * the maximum number of MBSSID interfaces supported by the driver.
7419+ * Driver should indicate MBSSID support by setting
7420+ * wiphy->mbssid_max_interfaces to a value more than or equal to 2.
7421+ *
7422+ * @NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY: Used by the kernel
7423+ * to advertise the maximum profile periodicity supported by the driver
7424+ * if EMA is enabled. Driver should indicate EMA support to the userspace
7425+ * by setting wiphy->mbssid_max_ema_profile_periodicity to
7426+ * a non-zero value.
7427+ *
7428+ * @NL80211_MBSSID_CONFIG_ATTR_INDEX: Mandatory parameter to pass the index of
7429+ * this BSS (u8) in the multiple BSSID set.
7430+ * Value must be set to 0 for the transmitting interface and non-zero for
7431+ * all non-transmitting interfaces. The userspace will be responsible
7432+ * for using unique indices for the interfaces.
7433+ * Range: 0 to wiphy->mbssid_max_interfaces-1.
7434+ *
7435+ * @NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX: Mandatory parameter for
7436+ * a non-transmitted profile which provides the interface index (u32) of
7437+ * the transmitted profile. The value must match one of the interface
7438+ * indices advertised by the kernel. Optional if the interface being set up
7439+ * is the transmitting one, however, if provided then the value must match
7440+ * the interface index of the same.
7441+ *
7442+ * @NL80211_MBSSID_CONFIG_ATTR_EMA: Flag used to enable EMA AP feature.
7443+ * Setting this flag is permitted only if the driver advertises EMA support
7444+ * by setting wiphy->mbssid_max_ema_profile_periodicity to non-zero.
7445+ *
7446+ * @__NL80211_MBSSID_CONFIG_ATTR_LAST: Internal
7447+ * @NL80211_MBSSID_CONFIG_ATTR_MAX: highest attribute
7448+ */
7449+enum nl80211_mbssid_config_attributes {
7450+ __NL80211_MBSSID_CONFIG_ATTR_INVALID,
7451+
7452+ NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES,
7453+ NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY,
7454+ NL80211_MBSSID_CONFIG_ATTR_INDEX,
7455+ NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX,
7456+ NL80211_MBSSID_CONFIG_ATTR_EMA,
7457+
7458+ /* keep last */
7459+ __NL80211_MBSSID_CONFIG_ATTR_LAST,
7460+ NL80211_MBSSID_CONFIG_ATTR_MAX = __NL80211_MBSSID_CONFIG_ATTR_LAST - 1,
7461+};
7462+
73897463 #endif /* __LINUX_NL80211_H */