P2PS: Allow p2p_build_ssid() to use pre-set SSID

This is needed to allow P2PS PD to prepare SSID for the group.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Krishna Vamsi 2014-12-10 15:44:18 +05:30 committed by Jouni Malinen
parent d4b43b5886
commit 59fec34d9c

View file

@ -1735,7 +1735,14 @@ void p2p_build_ssid(struct p2p_data *p2p, u8 *ssid, size_t *ssid_len)
int p2p_go_params(struct p2p_data *p2p, struct p2p_go_neg_results *params) int p2p_go_params(struct p2p_data *p2p, struct p2p_go_neg_results *params)
{ {
p2p_build_ssid(p2p, params->ssid, &params->ssid_len); if (p2p->ssid_set) {
os_memcpy(params->ssid, p2p->ssid, p2p->ssid_len);
params->ssid_len = p2p->ssid_len;
} else {
p2p_build_ssid(p2p, params->ssid, &params->ssid_len);
}
p2p->ssid_set = 0;
p2p_random(params->passphrase, p2p->cfg->passphrase_len); p2p_random(params->passphrase, p2p->cfg->passphrase_len);
return 0; return 0;
} }