History

cfg80211: VLAN offload support for set_key and set_sta_vlan

This provides an alternative mechanism for AP VLAN support where a single netdev is used with VLAN tagged frames instead of separate netdevs for each VLAN without tagged frames from the WLAN driver. By setting NL80211_EXT_FEATURE_VLAN_OFFLOAD flag the driver indicates support for a single netdev with VLAN tagged frames. Separate VLAN-specific netdevs can be added using RTM_NEWLINK/IFLA_VLAN_ID similarly to Ethernet. NL80211_CMD_NEW_KEY (for group keys), NL80211_CMD_NEW_STATION, and NL80211_CMD_SET_STATION will optionally specify vlan_id using NL80211_ATTR_VLAN_ID.

Gurumoorthi Gnanasambandhan committed 7 years ago

Commit 14f34e31 parent 6912dae3 files · +41 −0Browse files

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

Unified · Split

include/uapi/linux/nl80211.h+26−0
@@ -248,6 +248,22 @@ · 247 unmodified lines
248248 * %NL80211_ATTR_SAE_PASSWORD.
249249 */
250250
251+/**
252+ * DOC: VLAN offload support for setting group keys and binding STAs to VLANs
253+ *
254+ * By setting @NL80211_EXT_FEATURE_VLAN_OFFLOAD flag drivers can indicate they
255+ * support offloading VLAN functionality in a manner where the driver exposes a
256+ * single netdev that uses VLAN tagged frames and separate VLAN-specific netdevs
257+ * can then be added using RTM_NEWLINK/IFLA_VLAN_ID similarly to the Ethernet
258+ * case. Frames received from stations that are not assigned to any VLAN are
259+ * delivered on the main netdev and frames to such stations can be sent through
260+ * that main netdev.
261+ *
262+ * %NL80211_CMD_NEW_KEY (for group keys), %NL80211_CMD_NEW_STATION, and
263+ * %NL80211_CMD_SET_STATION will optionally specify vlan_id using
264+ * %NL80211_ATTR_VLAN_ID.
265+ */
266+
251267 /**
252268 * enum nl80211_commands - supported nl80211 commands
253269 *
@@ -2381,6 +2397,9 @@ enum nl80211_commands { · 2127 unmodified lines
23812397 * the allowed channel bandwidth configurations. (u8 attribute)
23822398 * Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13.
23832399 *
2400+ * @NL80211_ATTR_VLAN_ID: VLAN ID (1..4094) for the station and VLAN group key
2401+ * (u16).
2402+ *
23842403 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
23852404 * @NL80211_ATTR_MAX: highest attribute number currently defined
23862405 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2843,6 +2862,8 @@ enum nl80211_attrs { · 456 unmodified lines
28432862 NL80211_ATTR_WIPHY_EDMG_CHANNELS,
28442863 NL80211_ATTR_WIPHY_EDMG_BW_CONFIG,
28452864
2865+ NL80211_ATTR_VLAN_ID,
2866+
28462867 /* add attributes here, update the policy in nl80211.c */
28472868
28482869 __NL80211_ATTR_AFTER_LAST,
@@ -5492,6 +5513,10 @@ enum nl80211_feature_flags { · 2643 unmodified lines
54925513 * @NL80211_EXT_FEATURE_SAE_OFFLOAD: Device wants to do SAE authentication in
54935514 * station mode (SAE password is passed as part of the connect command).
54945515 *
5516+ * @NL80211_EXT_FEATURE_VLAN_OFFLOAD: The driver supports a single netdev
5517+ * with VLAN tagged frames and separate VLAN-specific netdevs added using
5518+ * vconfig similarly to the Ethernet case.
5519+ *
54955520 * @NUM_NL80211_EXT_FEATURES: number of extended features.
54965521 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
54975522 */
@@ -5537,6 +5562,7 @@ enum nl80211_ext_feature_index { · 39 unmodified lines
55375562 NL80211_EXT_FEATURE_EXT_KEY_ID,
55385563 NL80211_EXT_FEATURE_STA_TX_PWR,
55395564 NL80211_EXT_FEATURE_SAE_OFFLOAD,
5565+ NL80211_EXT_FEATURE_VLAN_OFFLOAD,
55405566
55415567 /* add new features before the definition below */
55425568 NUM_NL80211_EXT_FEATURES,