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.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -1407,8 +1407,12 @@ enum nl80211_commands { · 1406 unmodified lines | ||
| 1407 | 1407 | * |
| 1408 | 1408 | * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is |
| 1409 | 1409 | * used for the association (&enum nl80211_mfp, represented as a u32); |
| 1410 | − * this attribute can be used | |
| 1411 | − * with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests | |
| 1410 | + * this attribute can be used with %NL80211_CMD_ASSOCIATE and | |
| 1411 | + * %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 | 1417 | * @NL80211_ATTR_STA_FLAGS2: Attribute containing a |
| 1414 | 1418 | * &struct nl80211_sta_flag_update. |
| @@ -3947,10 +3951,12 @@ enum nl80211_key_type { · 2532 unmodified lines | ||
| 3947 | 3951 | * enum nl80211_mfp - Management frame protection state |
| 3948 | 3952 | * @NL80211_MFP_NO: Management frame protection not used |
| 3949 | 3953 | * @NL80211_MFP_REQUIRED: Management frame protection required |
| 3954 | + * @NL80211_MFP_OPTIONAL: Management frame protection is optional | |
| 3950 | 3955 | */ |
| 3951 | 3956 | enum nl80211_mfp { |
| 3952 | 3957 | NL80211_MFP_NO, |
| 3953 | 3958 | NL80211_MFP_REQUIRED, |
| 3959 | + NL80211_MFP_OPTIONAL, | |
| 3954 | 3960 | }; |
| 3955 | 3961 | |
| 3956 | 3962 | enum nl80211_wpa_versions { |
| @@ -4923,6 +4929,8 @@ enum nl80211_feature_flags { · 966 unmodified lines | ||
| 4923 | 4929 | * the first probe request in each channel at rate of at least 5.5Mbps. |
| 4924 | 4930 | * @NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: Driver supports |
| 4925 | 4931 | * 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 | 4935 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 4928 | 4936 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| @@ -4949,6 +4957,7 @@ enum nl80211_ext_feature_index { · 20 unmodified lines | ||
| 4949 | 4957 | NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP, |
| 4950 | 4958 | NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE, |
| 4951 | 4959 | NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION, |
| 4960 | + NL80211_EXT_FEATURE_MFP_OPTIONAL, | |
| 4952 | 4961 | |
| 4953 | 4962 | /* add new features before the definition below */ |
| 4954 | 4963 | NUM_NL80211_EXT_FEATURES, |