History

nl80211: add an option to allow MFP without requiring it

The user space can now allow the kernel to associate to an AP that requires MFP or that doesn't have MFP enabled in the same NL80211_CMD_CONNECT command, by using a new NL80211_MFP_OPTIONAL flag. The driver / firmware will decide whether to use it or not. Include a feature bit to advertise support for NL80211_MFP_OPTIONAL. This allows new user space to run on old kernels and know that it cannot use the new attribute if it isn't supported.

Emmanuel Grumbach committed 9 years ago

Commit 65026001 parent a6bcda42 files · +18 −3Browse files

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

Unified · Split

include/uapi/linux/nl80211.h+11−2
@@ -1407,8 +1407,12 @@ enum nl80211_commands { · 1406 unmodified lines
1407 *1407 *
1408 * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is1408 * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is
1409 * used for the association (&enum nl80211_mfp, represented as a u32);1409 * used for the association (&enum nl80211_mfp, represented as a u32);
1410 * this attribute can be used1410 * this attribute can be used with %NL80211_CMD_ASSOCIATE and
1411 * with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests1411 * %NL80211_CMD_CONNECT requests. %NL80211_MFP_OPTIONAL is not allowed for
1412 * %NL80211_CMD_ASSOCIATE since user space SME is expected and hence, it
1413 * must have decided whether to use management frame protection or not.
1414 * Setting %NL80211_MFP_OPTIONAL with a %NL80211_CMD_CONNECT request will
1415 * let the driver (or the firmware) decide whether to use MFP or not.
1412 *1416 *
1413 * @NL80211_ATTR_STA_FLAGS2: Attribute containing a1417 * @NL80211_ATTR_STA_FLAGS2: Attribute containing a
1414 * &struct nl80211_sta_flag_update.1418 * &struct nl80211_sta_flag_update.
@@ -3947,10 +3951,12 @@ enum nl80211_key_type { · 2532 unmodified lines
3947 * enum nl80211_mfp - Management frame protection state3951 * enum nl80211_mfp - Management frame protection state
3948 * @NL80211_MFP_NO: Management frame protection not used3952 * @NL80211_MFP_NO: Management frame protection not used
3949 * @NL80211_MFP_REQUIRED: Management frame protection required3953 * @NL80211_MFP_REQUIRED: Management frame protection required
3954 * @NL80211_MFP_OPTIONAL: Management frame protection is optional
3950 */3955 */
3951enum nl80211_mfp {3956enum nl80211_mfp {
3952 NL80211_MFP_NO,3957 NL80211_MFP_NO,
3953 NL80211_MFP_REQUIRED,3958 NL80211_MFP_REQUIRED,
3959 NL80211_MFP_OPTIONAL,
3954};3960};
3955 3961
3956enum nl80211_wpa_versions {3962enum nl80211_wpa_versions {
@@ -4923,6 +4929,8 @@ enum nl80211_feature_flags { · 966 unmodified lines
4923 * the first probe request in each channel at rate of at least 5.5Mbps.4929 * the first probe request in each channel at rate of at least 5.5Mbps.
4924 * @NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: Driver supports4930 * @NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: Driver supports
4925 * probe request tx deferral and suppression4931 * probe request tx deferral and suppression
4932 * @NL80211_EXT_FEATURE_MFP_OPTIONAL: Driver supports the %NL80211_MFP_OPTIONAL
4933 * value in %NL80211_ATTR_USE_MFP.
4926 *4934 *
4927 * @NUM_NL80211_EXT_FEATURES: number of extended features.4935 * @NUM_NL80211_EXT_FEATURES: number of extended features.
4928 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.4936 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -4949,6 +4957,7 @@ enum nl80211_ext_feature_index { · 20 unmodified lines
4949 NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP,4957 NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP,
4950 NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE,4958 NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE,
4951 NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION,4959 NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION,
4960 NL80211_EXT_FEATURE_MFP_OPTIONAL,
4952 4961
4953 /* add new features before the definition below */4962 /* add new features before the definition below */
4954 NUM_NL80211_EXT_FEATURES,4963 NUM_NL80211_EXT_FEATURES,