From 57ae1f5be99844100c5598a2d5fcc45670684801 Mon Sep 17 00:00:00 2001 From: David Spinadel Date: Sun, 18 Jan 2015 20:44:05 -0500 Subject: [PATCH] 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 --- wpa_supplicant/p2p_supplicant.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 59f95c355..72d68730c 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -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; }