From dc7b71324df9788e194745e8ab9386a4619a623a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 14 Sep 2012 12:53:47 -0700 Subject: P2P: Move p2p_cb_on_scan_complete to global context Since we have a global P2P module, the flag to trigger scan completion events to it needs to be in similar context. The previous design maintained this separately for each virtual interface and if P2P module did not run its scan operation on the virtual interface that completed the scan, P2P module would not be allowed to restart operations properly. Change-Id: I1b5a55c03aede15bbe0ac70dcbe0011a90f69b20 Signed-off-by: Dmitry Shmidt --- wpa_supplicant/wpa_supplicant.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wpa_supplicant/wpa_supplicant.c') diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 8730e0f..49830d6 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -200,9 +200,9 @@ static void wpa_supplicant_timeout(void *eloop_ctx, void *timeout_ctx) wpa_supplicant_req_scan(wpa_s, 1, 0); #ifdef CONFIG_P2P - if (wpa_s->p2p_cb_on_scan_complete && !wpa_s->global->p2p_disabled && + if (wpa_s->global->p2p_cb_on_scan_complete && !wpa_s->global->p2p_disabled && wpa_s->global->p2p != NULL) { - wpa_s->p2p_cb_on_scan_complete = 0; + wpa_s->global->p2p_cb_on_scan_complete = 0; if (p2p_other_scan_completed(wpa_s->global->p2p) == 1) { wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Pending P2P operation " "continued after timed out authentication"); @@ -3471,9 +3471,9 @@ void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid) 1000 * (timeout % 1000)); #ifdef CONFIG_P2P - if (wpa_s->p2p_cb_on_scan_complete && !wpa_s->global->p2p_disabled && + if (wpa_s->global->p2p_cb_on_scan_complete && !wpa_s->global->p2p_disabled && wpa_s->global->p2p != NULL) { - wpa_s->p2p_cb_on_scan_complete = 0; + wpa_s->global->p2p_cb_on_scan_complete = 0; if (p2p_other_scan_completed(wpa_s->global->p2p) == 1) { wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Pending P2P operation " "continued after failed association"); -- cgit v1.1