aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-03-23 16:44:10 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-25 16:40:56 (GMT)
commitf347429cf160140b74a1b2f1af0e506bd52c91ba (patch)
tree53b0cf5b06a06b40d8210457457eb7a2912c664c
parente86859929fd5e0fcc733192b1db7af2f6315af36 (diff)
downloadhostap-f347429cf160140b74a1b2f1af0e506bd52c91ba.zip
hostap-f347429cf160140b74a1b2f1af0e506bd52c91ba.tar.gz
hostap-f347429cf160140b74a1b2f1af0e506bd52c91ba.tar.bz2
P2P: Fix persistent group for 60 GHz networks
Fix two problems with storage of 60 GHz P2P persistent groups: 1. pbss flag was not stored in the network block. 2. When recreating the persistent group from storage, in addition to the missing pbss flag, the pairwise_cipher and group_cipher were initialized to CCMP which does not work in 60 GHz since the default in 60 GHz should be GCMP. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
-rw-r--r--wpa_supplicant/p2p_supplicant.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 67ca67c..b310885 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -1134,7 +1134,8 @@ static int wpas_p2p_store_persistent_group(struct wpa_supplicant *wpa_s,
s->auth_alg = WPA_AUTH_ALG_OPEN;
s->key_mgmt = WPA_KEY_MGMT_PSK;
s->proto = WPA_PROTO_RSN;
- s->pairwise_cipher = WPA_CIPHER_CCMP;
+ s->pbss = ssid->pbss;
+ s->pairwise_cipher = ssid->pbss ? WPA_CIPHER_GCMP : WPA_CIPHER_CCMP;
s->export_keys = 1;
if (ssid->passphrase) {
os_free(s->passphrase);
@@ -6107,8 +6108,10 @@ static int wpas_start_p2p_client(struct wpa_supplicant *wpa_s,
wpa_config_set_network_defaults(ssid);
ssid->temporary = 1;
ssid->proto = WPA_PROTO_RSN;
- ssid->pairwise_cipher = WPA_CIPHER_CCMP;
- ssid->group_cipher = WPA_CIPHER_CCMP;
+ ssid->pbss = params->pbss;
+ ssid->pairwise_cipher = params->pbss ? WPA_CIPHER_GCMP :
+ WPA_CIPHER_CCMP;
+ ssid->group_cipher = params->pbss ? WPA_CIPHER_GCMP : WPA_CIPHER_CCMP;
ssid->key_mgmt = WPA_KEY_MGMT_PSK;
ssid->ssid = os_malloc(params->ssid_len);
if (ssid->ssid == NULL) {