History

nl80211/cfg80211: Extended Key ID support

Add support for IEEE 802.11-2016 "Extended Key ID for Individually Addressed Frames". Extend cfg80211 and nl80211 to allow pairwise keys to be installed for Rx only, enable Tx separately and allow Key ID 1 for pairwise keys.

Alexander Wetzel committed 7 years ago

Commit 6cdd3971 parent 092c4096 files · +101 −16Browse files

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

Unified · Split

include/uapi/linux/nl80211.h+28−0
@@ -4152,6 +4152,27 @@ enum nl80211_channel_type { · 4151 unmodified lines
41524152 NL80211_CHAN_HT40PLUS
41534153 };
41544154
4155+/**
4156+ * enum nl80211_key_mode - Key mode
4157+ *
4158+ * @NL80211_KEY_RX_TX: (Default)
4159+ * Key can be used for Rx and Tx immediately
4160+ *
4161+ * The following modes can only be selected for unicast keys and when the
4162+ * driver supports @NL80211_EXT_FEATURE_EXT_KEY_ID:
4163+ *
4164+ * @NL80211_KEY_NO_TX: Only allowed in combination with @NL80211_CMD_NEW_KEY:
4165+ * Unicast key can only be used for Rx, Tx not allowed, yet
4166+ * @NL80211_KEY_SET_TX: Only allowed in combination with @NL80211_CMD_SET_KEY:
4167+ * The unicast key identified by idx and mac is cleared for Tx and becomes
4168+ * the preferred Tx key for the station.
4169+ */
4170+enum nl80211_key_mode {
4171+ NL80211_KEY_RX_TX,
4172+ NL80211_KEY_NO_TX,
4173+ NL80211_KEY_SET_TX
4174+};
4175+
41554176 /**
41564177 * enum nl80211_chan_width - channel width definitions
41574178 *
@@ -4395,6 +4416,9 @@ enum nl80211_key_default_types { · 237 unmodified lines
43954416 * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags
43964417 * attributes, specifying what a key should be set as default as.
43974418 * See &enum nl80211_key_default_types.
4419+ * @NL80211_KEY_MODE: the mode from enum nl80211_key_mode.
4420+ * Defaults to @NL80211_KEY_RX_TX.
4421+ *
43984422 * @__NL80211_KEY_AFTER_LAST: internal
43994423 * @NL80211_KEY_MAX: highest key attribute
44004424 */
@@ -4408,6 +4432,7 @@ enum nl80211_key_attributes { · 7 unmodified lines
44084432 NL80211_KEY_DEFAULT_MGMT,
44094433 NL80211_KEY_TYPE,
44104434 NL80211_KEY_DEFAULT_TYPES,
4435+ NL80211_KEY_MODE,
44114436
44124437 /* keep last */
44134438 __NL80211_KEY_AFTER_LAST,
@@ -5353,6 +5378,8 @@ enum nl80211_feature_flags { · 939 unmodified lines
53535378 * able to rekey an in-use key correctly. Userspace must not rekey PTK keys
53545379 * if this flag is not set. Ignoring this can leak clear text packets and/or
53555380 * freeze the connection.
5381+ * @NL80211_EXT_FEATURE_EXT_KEY_ID: Driver supports "Extended Key ID for
5382+ * Individually Addressed Frames" from IEEE802.11-2016.
53565383 *
53575384 * @NL80211_EXT_FEATURE_AIRTIME_FAIRNESS: Driver supports getting airtime
53585385 * fairness for transmitted packets and has enabled airtime fairness
@@ -5406,6 +5433,7 @@ enum nl80211_ext_feature_index { · 47 unmodified lines
54065433 NL80211_EXT_FEATURE_AIRTIME_FAIRNESS,
54075434 NL80211_EXT_FEATURE_AP_PMKSA_CACHING,
54085435 NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD,
5436+ NL80211_EXT_FEATURE_EXT_KEY_ID,
54095437
54105438 /* add new features before the definition below */
54115439 NUM_NL80211_EXT_FEATURES,