aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/bss.c
diff options
context:
space:
mode:
authorNeeraj Kumar Garg <neerajkg@broadcom.com>2012-04-06 11:58:22 (GMT)
committerJouni Malinen <j@w1.fi>2012-04-06 11:58:22 (GMT)
commitc772ef43f6e91e2e90d610c5f3275d45ade286f6 (patch)
treeff965fd4aa00435f1a487866fc1206ff653304d3 /wpa_supplicant/bss.c
parent5a49459ee8efd685c8da923afa7da791d9319ee6 (diff)
downloadhostap-c772ef43f6e91e2e90d610c5f3275d45ade286f6.zip
hostap-c772ef43f6e91e2e90d610c5f3275d45ade286f6.tar.gz
hostap-c772ef43f6e91e2e90d610c5f3275d45ade286f6.tar.bz2
P2P: Update BSS entries in P2P group interface only if P2P IE is present
For concurrency scenarios we should not update the scan results without P2P IE to P2P group interfaces. 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. Since P2P group interfaces are used only for connecting to a P2P group, it is fine to filter out all non-P2P entries from their BSS table. Signed-off-by: Neeraj Garg <neerajkg@broadcom.com>
Diffstat (limited to 'wpa_supplicant/bss.c')
-rw-r--r--wpa_supplicant/bss.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index b79510e..792316d 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -379,6 +379,18 @@ void wpa_bss_update_scan_res(struct wpa_supplicant *wpa_s,
}
p2p = wpa_scan_get_vendor_ie(res, P2P_IE_VENDOR_TYPE);
+#ifdef CONFIG_P2P
+ if (p2p == NULL &&
+ wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE) {
+ /*
+ * If it's 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 " MACSTR
+ " update for P2P interface", MAC2STR(res->bssid));
+ return;
+ }
+#endif /* CONFIG_P2P */
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 */