History

nl80211: Add support to set AP settings flags with single attribute

In previous method each AP settings flag is represented by a top-level flag attribute and conversion to enum cfg80211_ap_settings_flags had to be done before sending them to driver. This commit is to make it easier to define new AP settings flags and sending them to driver. This commit also deprecate sending of %NL80211_ATTR_EXTERNAL_AUTH_SUPPORT in %NL80211_CMD_START_AP. But to maintain backwards compatibility checks for %NL80211_ATTR_EXTERNAL_AUTH_SUPPORT in %NL80211_CMD_START_AP when %NL80211_ATTR_AP_SETTINGS_FLAGS not present in %NL80211_CMD_START_AP.

Veerendranath Jakkam committed 4 years ago

Commit 47301a71 parent 636ccda3 files · +25 −14Browse files

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

Unified · Split

include/uapi/linux/nl80211.h+19−1
@@ -2477,7 +2477,9 @@ enum nl80211_commands { · 2476 unmodified lines
24772477 * space supports external authentication. This attribute shall be used
24782478 * with %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP request. The driver
24792479 * may offload authentication processing to user space if this capability
2480− * is indicated in the respective requests from the user space.
2480+ * is indicated in the respective requests from the user space. (This flag
2481+ * attribute deprecated for %NL80211_CMD_START_AP, use
2482+ * %NL80211_ATTR_AP_SETTINGS_FLAGS)
24812483 *
24822484 * @NL80211_ATTR_NSS: Station's New/updated RX_NSS value notified using this
24832485 * u8 attribute. This is used with %NL80211_CMD_STA_OPMODE_CHANGED.
@@ -2653,6 +2655,10 @@ enum nl80211_commands { · 169 unmodified lines
26532655 * switching on a different channel during CAC detection on the selected
26542656 * radar channel.
26552657 *
2658+ * @NL80211_ATTR_AP_SETTINGS_FLAGS: u32 attribute contains ap settings flags,
2659+ * enumerated in &enum nl80211_ap_settings_flags. This attribute shall be
2660+ * used with %NL80211_CMD_START_AP request.
2661+ *
26562662 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
26572663 * @NL80211_ATTR_MAX: highest attribute number currently defined
26582664 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3161,6 +3167,8 @@ enum nl80211_attrs { · 502 unmodified lines
31613167
31623168 NL80211_ATTR_RADAR_BACKGROUND,
31633169
3170+ NL80211_ATTR_AP_SETTINGS_FLAGS,
3171+
31643172 /* add attributes here, update the policy in nl80211.c */
31653173
31663174 __NL80211_ATTR_AFTER_LAST,
@@ -7481,4 +7489,14 @@ enum nl80211_mbssid_config_attributes { · 4314 unmodified lines
74817489 NL80211_MBSSID_CONFIG_ATTR_MAX = __NL80211_MBSSID_CONFIG_ATTR_LAST - 1,
74827490 };
74837491
7492+/**
7493+ * enum nl80211_ap_settings_flags - AP settings flags
7494+ *
7495+ * @NL80211_AP_SETTINGS_EXTERNAL_AUTH_SUPPORT: AP supports external
7496+ * authentication.
7497+ */
7498+enum nl80211_ap_settings_flags {
7499+ NL80211_AP_SETTINGS_EXTERNAL_AUTH_SUPPORT = 1 << 0,
7500+};
7501+
74847502 #endif /* __LINUX_NL80211_H */