[PATCH] P2P: Fix problem with connecting to non-P2P network in P2P mode

Klimczewski Marcin marcin.klimczewski
Thu May 17 07:11:34 PDT 2012


This patch allows connection to non-P2P network in P2P mode. In P2P 
mode, attempt to connect to non-P2P network always fails due to handling 
scan results in P2P specific way and scan process looping itself. To 
solve it wpas_p2p_stop_find() is called just after invoking scan request.

 From 75ef9fd523266cc1925681a1973e70d014b5df4a Mon Sep 17 00:00:00 2001
From: Marcin Klimczewski <marcin.klimczewski at tieto.com>
Date: Thu, 17 May 2012 12:28:41 +0200
Subject: [PATCH] P2P: Fix problem with connecting to non-P2P network in 
P2P mode

To allow to connect to non-P2P network in P2P mode,
p2p_stop_find is called just after invoking scan request.

Signed-off-by: Marcin Klimczewski <marcin.klimczewski at tieto.com>
---
  wpa_supplicant/scan.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index e66eed1..85fcf4d 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -708,6 +708,8 @@ void wpa_supplicant_req_scan(struct wpa_supplicant 
*wpa_s, int sec, int usec)
                 }
         }

+       wpas_p2p_stop_find(wpa_s);
+
         wpa_dbg(wpa_s, MSG_DEBUG, "Setting scan request: %d sec %d usec",
                 sec, usec);
         eloop_cancel_timeout(wpa_supplicant_scan, wpa_s, NULL);
-- 
1.7.0.4

BR
Marcin Klimczewski




More information about the Hostap mailing list