From patchwork Thu Apr 5 12:43:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: P2P: For concurrency scenarios we should not update the scan results without P2PIE to p2p group interface Date: Thu, 05 Apr 2012 02:43:21 -0000 From: Neeraj Garg X-Patchwork-Id: 150948 Message-Id: <2C2F1EBA8050E74EA81502D5740B4BD6BBDF3DD84D@SJEXCHCCR02.corp.ad.broadcom.com> To: "hostap@lists.shmoo.com" This patch is to take care if a scan has been requested on STA interface and scan results are getting updated from sibling to p2p group interface. A P2P Go probe response for a legacy STA scan would be without P2P IE. So it will wrongly update the bss list of p2p group interface too when results are updated from sibling. Plz let me know if patch is OK. >From 6ed3c8a7d2ef425bcc8bdaf7cea5c9fd78931810 Mon Sep 17 00:00:00 2001 From: Neeraj Garg Date: Thu, 5 Apr 2012 17:40:06 +0530 Subject: [PATCH] For concurrency scenarios we should not update the scan results without P2PIE to p2p group interface Signed-off-by: Neeraj Garg --- wpa_supplicant/bss.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) mode change 100644 => 100755 wpa_supplicant/bss.c diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c old mode 100644 new mode 100755 index b79510e..cdae799 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -379,6 +379,14 @@ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s, } p2p = wpa_scan_get_vendor_ie(res, P2P_IE_VENDOR_TYPE); + if (p2p == NULL) { + if (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) { + /* If its a P2P specific interface, then don't update the scan + * result without a p2p IE. */ + wpa_printf(MSG_DEBUG, "BSS: NO P2P IE skipping bss update for p2p interface"); + return; + } + } if (p2p && ssid[1] == P2P_WILDCARD_SSID_LEN && os_memcmp(ssid + 2, P2P_WILDCARD_SSID, P2P_WILDCARD_SSID_LEN) == 0) return; /* Skip P2P listen discovery results here */