Include pending MFP defines in nl80211_copy.h
This can be used to get rid of the extra cpp define since we have our local copy of wireless.h and nl80211.h.
This commit is contained in:
parent
c2fef14520
commit
e834272f73
3 changed files with 6 additions and 12 deletions
|
@ -295,14 +295,10 @@ static int nl_set_encr(int ifindex, struct i802_driver_data *drv,
|
|||
0, NL80211_CMD_SET_KEY, 0);
|
||||
NLA_PUT_U8(msg, NL80211_ATTR_KEY_IDX, idx);
|
||||
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, ifindex);
|
||||
#ifdef NL80211_MFP_PENDING
|
||||
if (strcmp(alg, "IGTK") == 0)
|
||||
NLA_PUT_FLAG(msg, NL80211_ATTR_KEY_DEFAULT_MGMT);
|
||||
else
|
||||
NLA_PUT_FLAG(msg, NL80211_ATTR_KEY_DEFAULT);
|
||||
#else /* NL80211_MFP_PENDING */
|
||||
NLA_PUT_FLAG(msg, NL80211_ATTR_KEY_DEFAULT);
|
||||
#endif /* NL80211_MFP_PENDING */
|
||||
|
||||
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
|
||||
if (ret == -ENOENT)
|
||||
|
@ -905,10 +901,8 @@ static int i802_sta_set_flags(void *priv, const u8 *addr,
|
|||
if (total_flags & WLAN_STA_SHORT_PREAMBLE)
|
||||
NLA_PUT_FLAG(flags, NL80211_STA_FLAG_SHORT_PREAMBLE);
|
||||
|
||||
#ifdef NL80211_MFP_PENDING
|
||||
if (total_flags & WLAN_STA_MFP)
|
||||
NLA_PUT_FLAG(flags, NL80211_STA_FLAG_MFP);
|
||||
#endif /* NL80211_MFP_PENDING */
|
||||
|
||||
if (nla_put_nested(msg, NL80211_ATTR_STA_FLAGS, flags))
|
||||
goto nla_put_failure;
|
||||
|
|
|
@ -72,8 +72,8 @@
|
|||
*
|
||||
* @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified
|
||||
* by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC.
|
||||
* @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT or
|
||||
* %NL80211_ATTR_KEY_THRESHOLD.
|
||||
* @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT,
|
||||
* %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD.
|
||||
* @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
|
||||
* %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC and %NL80211_ATTR_KEY_CIPHER
|
||||
* attributes.
|
||||
|
@ -346,6 +346,8 @@ enum nl80211_attrs {
|
|||
NL80211_ATTR_WIPHY_FREQ,
|
||||
NL80211_ATTR_WIPHY_CHANNEL_TYPE,
|
||||
|
||||
NL80211_ATTR_KEY_DEFAULT_MGMT,
|
||||
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
|
@ -412,12 +414,14 @@ enum nl80211_iftype {
|
|||
* @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames
|
||||
* with short barker preamble
|
||||
* @NL80211_STA_FLAG_WME: station is WME/QoS capable
|
||||
* @NL80211_STA_FLAG_MFP: station uses management frame protection
|
||||
*/
|
||||
enum nl80211_sta_flags {
|
||||
__NL80211_STA_FLAG_INVALID,
|
||||
NL80211_STA_FLAG_AUTHORIZED,
|
||||
NL80211_STA_FLAG_SHORT_PREAMBLE,
|
||||
NL80211_STA_FLAG_WME,
|
||||
NL80211_STA_FLAG_MFP,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_STA_FLAG_AFTER_LAST,
|
||||
|
|
|
@ -1726,13 +1726,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 WEXT_MFP_PENDING
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
case WPA_ALG_IGTK:
|
||||
ext->alg = IW_ENCODE_ALG_AES_CMAC;
|
||||
break;
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#endif /* WEXT_MFP_PENDING */
|
||||
default:
|
||||
wpa_printf(MSG_DEBUG, "%s: Unknown algorithm %d",
|
||||
__FUNCTION__, alg);
|
||||
|
@ -2084,7 +2082,6 @@ int wpa_driver_wext_associate(void *priv,
|
|||
IW_AUTH_RX_UNENCRYPTED_EAPOL,
|
||||
allow_unencrypted_eapol) < 0)
|
||||
ret = -1;
|
||||
#ifdef WEXT_MFP_PENDING
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
switch (params->mgmt_frame_protection) {
|
||||
case NO_MGMT_FRAME_PROTECTION:
|
||||
|
@ -2100,7 +2097,6 @@ int wpa_driver_wext_associate(void *priv,
|
|||
if (wpa_driver_wext_set_auth_param(drv, IW_AUTH_MFP, value) < 0)
|
||||
ret = -1;
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#endif /* WEXT_MFP_PENDING */
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue