P2P: Support GCMP as part of 60 GHz support
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
72a8e30b96
commit
d77419d234
4 changed files with 20 additions and 3 deletions
|
@ -1049,7 +1049,7 @@ int hostapd_init_wps(struct hostapd_data *hapd,
|
||||||
if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X)
|
if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X)
|
||||||
wps->auth_types |= WPS_AUTH_WPA2;
|
wps->auth_types |= WPS_AUTH_WPA2;
|
||||||
|
|
||||||
if (conf->rsn_pairwise & WPA_CIPHER_CCMP)
|
if (conf->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP))
|
||||||
wps->encr_types |= WPS_ENCR_AES;
|
wps->encr_types |= WPS_ENCR_AES;
|
||||||
if (conf->rsn_pairwise & WPA_CIPHER_TKIP)
|
if (conf->rsn_pairwise & WPA_CIPHER_TKIP)
|
||||||
wps->encr_types |= WPS_ENCR_TKIP;
|
wps->encr_types |= WPS_ENCR_TKIP;
|
||||||
|
|
|
@ -317,7 +317,8 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
|
||||||
bss->ssid.security_policy != SECURITY_PLAINTEXT)
|
bss->ssid.security_policy != SECURITY_PLAINTEXT)
|
||||||
goto no_wps;
|
goto no_wps;
|
||||||
if (bss->ssid.security_policy == SECURITY_WPA_PSK &&
|
if (bss->ssid.security_policy == SECURITY_WPA_PSK &&
|
||||||
(!(bss->rsn_pairwise & WPA_CIPHER_CCMP) || !(bss->wpa & 2)))
|
(!(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP)) ||
|
||||||
|
!(bss->wpa & 2)))
|
||||||
goto no_wps; /* WPS2 does not allow WPA/TKIP-only
|
goto no_wps; /* WPS2 does not allow WPA/TKIP-only
|
||||||
* configuration */
|
* configuration */
|
||||||
bss->eap_server = 1;
|
bss->eap_server = 1;
|
||||||
|
|
|
@ -1462,6 +1462,15 @@ static void wpas_start_wps_go(struct wpa_supplicant *wpa_s,
|
||||||
ssid->key_mgmt = WPA_KEY_MGMT_PSK;
|
ssid->key_mgmt = WPA_KEY_MGMT_PSK;
|
||||||
ssid->proto = WPA_PROTO_RSN;
|
ssid->proto = WPA_PROTO_RSN;
|
||||||
ssid->pairwise_cipher = WPA_CIPHER_CCMP;
|
ssid->pairwise_cipher = WPA_CIPHER_CCMP;
|
||||||
|
ssid->group_cipher = WPA_CIPHER_CCMP;
|
||||||
|
if (params->freq > 56160) {
|
||||||
|
/*
|
||||||
|
* Enable GCMP instead of CCMP as pairwise_cipher and
|
||||||
|
* group_cipher in 60 GHz.
|
||||||
|
*/
|
||||||
|
ssid->pairwise_cipher = WPA_CIPHER_GCMP;
|
||||||
|
ssid->group_cipher = WPA_CIPHER_GCMP;
|
||||||
|
}
|
||||||
if (os_strlen(params->passphrase) > 0) {
|
if (os_strlen(params->passphrase) > 0) {
|
||||||
ssid->passphrase = os_strdup(params->passphrase);
|
ssid->passphrase = os_strdup(params->passphrase);
|
||||||
if (ssid->passphrase == NULL) {
|
if (ssid->passphrase == NULL) {
|
||||||
|
|
|
@ -286,7 +286,9 @@ static void wpas_wps_remove_dup_network(struct wpa_supplicant *wpa_s,
|
||||||
/* compare security parameters */
|
/* compare security parameters */
|
||||||
if (ssid->auth_alg != new_ssid->auth_alg ||
|
if (ssid->auth_alg != new_ssid->auth_alg ||
|
||||||
ssid->key_mgmt != new_ssid->key_mgmt ||
|
ssid->key_mgmt != new_ssid->key_mgmt ||
|
||||||
ssid->group_cipher != new_ssid->group_cipher)
|
(ssid->group_cipher != new_ssid->group_cipher &&
|
||||||
|
!(ssid->group_cipher & new_ssid->group_cipher &
|
||||||
|
WPA_CIPHER_CCMP)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -471,6 +473,11 @@ static int wpa_supplicant_wps_cred(void *ctx,
|
||||||
break;
|
break;
|
||||||
case WPS_ENCR_AES:
|
case WPS_ENCR_AES:
|
||||||
ssid->pairwise_cipher = WPA_CIPHER_CCMP;
|
ssid->pairwise_cipher = WPA_CIPHER_CCMP;
|
||||||
|
if (wpa_s->drv_capa_known &&
|
||||||
|
(wpa_s->drv_enc & WPA_DRIVER_CAPA_ENC_GCMP)) {
|
||||||
|
ssid->pairwise_cipher |= WPA_CIPHER_GCMP;
|
||||||
|
ssid->group_cipher |= WPA_CIPHER_GCMP;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue