atheros: Add support for IEEE 802.11w configuration

This commit is contained in:
Mahesh Palivela 2011-04-08 12:06:27 +03:00 committed by Jouni Malinen
parent 3f3602386e
commit a1ca02927a
3 changed files with 17 additions and 0 deletions

View file

@ -203,6 +203,9 @@ int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname,
params.wpa_pairwise = hapd->conf->wpa_pairwise;
params.wpa_key_mgmt = hapd->conf->wpa_key_mgmt;
params.rsn_preauth = hapd->conf->rsn_preauth;
#ifdef CONFIG_IEEE80211W
params.ieee80211w = hapd->conf->ieee80211w;
#endif /* CONFIG_IEEE80211W */
}
return hostapd_set_ieee8021x(hapd, &params);
}

View file

@ -678,6 +678,7 @@ struct wpa_bss_params {
int wpa_pairwise;
int wpa_key_mgmt;
int rsn_preauth;
enum mfp_options ieee80211w;
};
#define WPA_STA_AUTHORIZED BIT(0)

View file

@ -315,6 +315,14 @@ atheros_configure_wpa(struct atheros_driver_data *drv,
v = 0;
if (params->rsn_preauth)
v |= BIT(0);
#ifdef CONFIG_IEEE80211W
if (params->ieee80211w != NO_MGMT_FRAME_PROTECTION) {
v |= BIT(7);
if (params->ieee80211w == MGMT_FRAME_PROTECTION_REQUIRED)
v |= BIT(6);
}
#endif /* CONFIG_IEEE80211W */
wpa_printf(MSG_DEBUG, "%s: rsn capabilities=0x%x",
__func__, params->rsn_preauth);
if (set80211param(drv, IEEE80211_PARAM_RSNCAPS, v)) {
@ -466,6 +474,11 @@ atheros_set_key(const char *ifname, void *priv, enum wpa_alg alg,
case WPA_ALG_CCMP:
cipher = IEEE80211_CIPHER_AES_CCM;
break;
#ifdef CONFIG_IEEE80211W
case WPA_ALG_IGTK:
cipher = IEEE80211_CIPHER_AES_CMAC;
break;
#endif /* CONFIG_IEEE80211W */
default:
printf("%s: unknown/unsupported algorithm %d\n",
__func__, alg);