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
14071407 *
14081408 * @NL80211_ATTR_USE_MFP: Whether management frame protection (IEEE 802.11w) is
14091409 * 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.
14121416 *
14131417 * @NL80211_ATTR_STA_FLAGS2: Attribute containing a
14141418 * &struct nl80211_sta_flag_update.
@@ -3947,10 +3951,12 @@ enum nl80211_key_type { · 2532 unmodified lines
39473951 * enum nl80211_mfp - Management frame protection state
39483952 * @NL80211_MFP_NO: Management frame protection not used
39493953 * @NL80211_MFP_REQUIRED: Management frame protection required
3954+ * @NL80211_MFP_OPTIONAL: Management frame protection is optional
39503955 */
39513956 enum nl80211_mfp {
39523957 NL80211_MFP_NO,
39533958 NL80211_MFP_REQUIRED,
3959+ NL80211_MFP_OPTIONAL,
39543960 };
39553961
39563962 enum nl80211_wpa_versions {
@@ -4923,6 +4929,8 @@ enum nl80211_feature_flags { · 966 unmodified lines
49234929 * the first probe request in each channel at rate of at least 5.5Mbps.
49244930 * @NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: Driver supports
49254931 * 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.
49264934 *
49274935 * @NUM_NL80211_EXT_FEATURES: number of extended features.
49284936 * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -4949,6 +4957,7 @@ enum nl80211_ext_feature_index { · 20 unmodified lines
49494957 NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP,
49504958 NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE,
49514959 NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION,
4960+ NL80211_EXT_FEATURE_MFP_OPTIONAL,
49524961
49534962 /* add new features before the definition below */
49544963 NUM_NL80211_EXT_FEATURES,