P2P: Use SSID from GO Negotiation to limit WPS provisioning step

In order to avoid picking incorrect SSID from old scan results, use
SSID from GO Negotiation to select the AP.
This commit is contained in:
Jouni Malinen 2010-08-05 09:15:11 -07:00 committed by Jouni Malinen
parent 743ef79914
commit e9a7ae41fa
4 changed files with 37 additions and 3 deletions

View file

@ -1092,8 +1092,13 @@ void p2p_go_complete(struct p2p_data *p2p, struct p2p_device *peer)
os_memcpy(res.ssid, p2p->ssid, p2p->ssid_len);
res.ssid_len = p2p->ssid_len;
p2p_random(res.passphrase, 8);
} else
} else {
res.freq = peer->oper_freq;
if (p2p->ssid_len) {
os_memcpy(res.ssid, p2p->ssid, p2p->ssid_len);
res.ssid_len = p2p->ssid_len;
}
}
p2p_channels_intersect(&p2p->channels, &peer->channels,
&intersection);