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
4152 NL80211_CHAN_HT40PLUS4152 NL80211_CHAN_HT40PLUS
4153};4153};
4154 4154
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 */
4170enum nl80211_key_mode {
4171 NL80211_KEY_RX_TX,
4172 NL80211_KEY_NO_TX,
4173 NL80211_KEY_SET_TX
4174};
4175
4155/**4176/**
4156 * enum nl80211_chan_width - channel width definitions4177 * enum nl80211_chan_width - channel width definitions
4157 *4178 *
@@ -4395,6 +4416,9 @@ enum nl80211_key_default_types { · 237 unmodified lines
4395 * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags4416 * @NL80211_KEY_DEFAULT_TYPES: A nested attribute containing flags
4396 * attributes, specifying what a key should be set as default as.4417 * attributes, specifying what a key should be set as default as.
4397 * See &enum nl80211_key_default_types.4418 * 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 *
4398 * @__NL80211_KEY_AFTER_LAST: internal4422 * @__NL80211_KEY_AFTER_LAST: internal
4399 * @NL80211_KEY_MAX: highest key attribute4423 * @NL80211_KEY_MAX: highest key attribute
4400 */4424 */
@@ -4408,6 +4432,7 @@ enum nl80211_key_attributes { · 7 unmodified lines
4408 NL80211_KEY_DEFAULT_MGMT,4432 NL80211_KEY_DEFAULT_MGMT,
4409 NL80211_KEY_TYPE,4433 NL80211_KEY_TYPE,
4410 NL80211_KEY_DEFAULT_TYPES,4434 NL80211_KEY_DEFAULT_TYPES,
4435 NL80211_KEY_MODE,
4411 4436
4412 /* keep last */4437 /* keep last */
4413 __NL80211_KEY_AFTER_LAST,4438 __NL80211_KEY_AFTER_LAST,
@@ -5353,6 +5378,8 @@ enum nl80211_feature_flags { · 939 unmodified lines
5353 * able to rekey an in-use key correctly. Userspace must not rekey PTK keys5378 * able to rekey an in-use key correctly. Userspace must not rekey PTK keys
5354 * if this flag is not set. Ignoring this can leak clear text packets and/or5379 * if this flag is not set. Ignoring this can leak clear text packets and/or
5355 * freeze the connection.5380 * freeze the connection.
5381 * @NL80211_EXT_FEATURE_EXT_KEY_ID: Driver supports "Extended Key ID for
5382 * Individually Addressed Frames" from IEEE802.11-2016.
5356 *5383 *
5357 * @NL80211_EXT_FEATURE_AIRTIME_FAIRNESS: Driver supports getting airtime5384 * @NL80211_EXT_FEATURE_AIRTIME_FAIRNESS: Driver supports getting airtime
5358 * fairness for transmitted packets and has enabled airtime fairness5385 * fairness for transmitted packets and has enabled airtime fairness
@@ -5406,6 +5433,7 @@ enum nl80211_ext_feature_index { · 47 unmodified lines
5406 NL80211_EXT_FEATURE_AIRTIME_FAIRNESS,5433 NL80211_EXT_FEATURE_AIRTIME_FAIRNESS,
5407 NL80211_EXT_FEATURE_AP_PMKSA_CACHING,5434 NL80211_EXT_FEATURE_AP_PMKSA_CACHING,
5408 NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD,5435 NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD,
5436 NL80211_EXT_FEATURE_EXT_KEY_ID,
5409 5437
5410 /* add new features before the definition below */5438 /* add new features before the definition below */
5411 NUM_NL80211_EXT_FEATURES,5439 NUM_NL80211_EXT_FEATURES,