P2P: Fix P2P invitation with NFC

Use interface's own NFC configuration instead of parent's one
to support a P2P device dedicated interface.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
This commit is contained in:
David Spinadel 2015-01-18 20:44:05 -05:00 committed by Jouni Malinen
parent 07565ab0f9
commit 57ae1f5be9

View file

@ -3158,14 +3158,14 @@ static u8 wpas_invitation_process(void *ctx, const u8 *sa, const u8 *bssid,
}
#ifdef CONFIG_WPS_NFC
if (dev_pw_id >= 0 && wpa_s->parent->p2p_nfc_tag_enabled &&
dev_pw_id == wpa_s->parent->p2p_oob_dev_pw_id) {
if (dev_pw_id >= 0 && wpa_s->p2p_nfc_tag_enabled &&
dev_pw_id == wpa_s->p2p_oob_dev_pw_id) {
wpa_printf(MSG_DEBUG, "P2P: Accept invitation based on local enabled NFC Tag");
wpa_s->parent->p2p_wps_method = WPS_NFC;
wpa_s->parent->pending_join_wps_method = WPS_NFC;
os_memcpy(wpa_s->parent->pending_join_dev_addr,
wpa_s->p2p_wps_method = WPS_NFC;
wpa_s->pending_join_wps_method = WPS_NFC;
os_memcpy(wpa_s->pending_join_dev_addr,
go_dev_addr, ETH_ALEN);
os_memcpy(wpa_s->parent->pending_join_iface_addr,
os_memcpy(wpa_s->pending_join_iface_addr,
bssid, ETH_ALEN);
goto accept_inv;
}