diff --git a/src/common/wireless_copy.h b/src/common/wireless_copy.h index e55362eb4..ad7646637 100644 --- a/src/common/wireless_copy.h +++ b/src/common/wireless_copy.h @@ -568,6 +568,8 @@ typedef __uint8_t __u8; #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 #define IW_AUTH_ROAMING_CONTROL 9 #define IW_AUTH_PRIVACY_INVOKED 10 +#define IW_AUTH_CIPHER_GROUP_MGMT 11 +#define IW_AUTH_MFP 12 /* IW_AUTH_WPA_VERSION values (bit field) */ #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001 @@ -595,6 +597,11 @@ typedef __uint8_t __u8; #define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming * control */ +/* IW_AUTH_MFP (management frame protection) values */ +#define IW_AUTH_MFP_DISABLED 0 /* MFP disabled */ +#define IW_AUTH_MFP_OPTIONAL 1 /* MFP optional */ +#define IW_AUTH_MFP_REQUIRED 2 /* MFP required */ + /* SIOCSIWENCODEEXT definitions */ #define IW_ENCODE_SEQ_MAX_SIZE 8 /* struct iw_encode_ext ->alg */ @@ -603,6 +610,7 @@ typedef __uint8_t __u8; #define IW_ENCODE_ALG_TKIP 2 #define IW_ENCODE_ALG_CCMP 3 #define IW_ENCODE_ALG_PMK 4 +#define IW_ENCODE_ALG_AES_CMAC 5 /* struct iw_encode_ext ->ext_flags */ #define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001 #define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002 diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c index 42d249769..157243ee4 100644 --- a/src/drivers/driver_wext.c +++ b/src/drivers/driver_wext.c @@ -1800,6 +1800,11 @@ static int wpa_driver_wext_set_key_ext(void *priv, wpa_alg alg, case WPA_ALG_PMK: ext->alg = IW_ENCODE_ALG_PMK; break; +#ifdef CONFIG_IEEE80211W + case WPA_ALG_IGTK: + ext->alg = IW_ENCODE_ALG_AES_CMAC; + break; +#endif /* CONFIG_IEEE80211W */ default: wpa_printf(MSG_DEBUG, "%s: Unknown algorithm %d", __FUNCTION__, alg); @@ -2153,6 +2158,21 @@ int wpa_driver_wext_associate(void *priv, IW_AUTH_RX_UNENCRYPTED_EAPOL, allow_unencrypted_eapol) < 0) ret = -1; +#ifdef CONFIG_IEEE80211W + switch (params->mgmt_frame_protection) { + case NO_MGMT_FRAME_PROTECTION: + value = IW_AUTH_MFP_DISABLED; + break; + case MGMT_FRAME_PROTECTION_OPTIONAL: + value = IW_AUTH_MFP_OPTIONAL; + break; + case MGMT_FRAME_PROTECTION_REQUIRED: + value = IW_AUTH_MFP_REQUIRED; + break; + }; + if (wpa_driver_wext_set_auth_param(drv, IW_AUTH_MFP, value) < 0) + ret = -1; +#endif /* CONFIG_IEEE80211W */ if (params->freq && wpa_driver_wext_set_freq(drv, params->freq) < 0) ret = -1; if (wpa_driver_wext_set_ssid(drv, params->ssid, params->ssid_len) < 0)