[PATCH] bss: Update bss with P2P IE for p2p find

Eduardo Abinader eduardo.abinader
Wed Sep 10 20:09:41 PDT 2014


Just update bss scan results for a p2p finding, if the scan
results contain p2p IE, no matter if the receiving iface
is p2p or not. Such change saves memory and avoid unecessary
notifications, by ignoring those BSSs supposedly not relevant
for p2p find procedure.

Signed-off-by: Eduardo Abinader <eduardo.abinader at openbossa.org>
---
 wpa_supplicant/bss.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c
index 7d01a5f..af4e8ba 100644
--- a/wpa_supplicant/bss.c
+++ b/wpa_supplicant/bss.c
@@ -627,7 +627,8 @@ 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) {
+	    (wpa_s->p2p_group_interface != NOT_P2P_GROUP_INTERFACE ||
+	     wpa_s->p2p_scan_work)) {
 		/*
 		 * If it's a P2P specific interface, then don't update
 		 * the scan result without a P2P IE.
-- 
1.9.1




More information about the Hostap mailing list