aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-03-18 14:31:09 (GMT)
committerJouni Malinen <j@w1.fi>2013-03-18 15:32:31 (GMT)
commitf85f545e71f2202f1bc7ab65235249320c05ec56 (patch)
tree378e56113ffad075a0fa9d5e454ccc2bc1b93d47 /wpa_supplicant/events.c
parent565110cd554801fa301c55010b3e9e14f43d7973 (diff)
downloadhostap-f85f545e71f2202f1bc7ab65235249320c05ec56.zip
hostap-f85f545e71f2202f1bc7ab65235249320c05ec56.tar.gz
hostap-f85f545e71f2202f1bc7ab65235249320c05ec56.tar.bz2
P2P: Use common function for re-starting P2P scan after station scan
Make the implementation more consistent and cleaner by using a single function for addressing all the cases where completion of a station mode scan operation allows a P2P operation (search) to be re-started. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index d91dd31..1c48eba 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2505,18 +2505,9 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
#ifndef CONFIG_NO_SCAN_PROCESSING
case EVENT_SCAN_RESULTS:
wpa_supplicant_event_scan_results(wpa_s, data);
-#ifdef CONFIG_P2P
- if (wpa_s->global->p2p_cb_on_scan_complete && !wpa_s->global->p2p_disabled &&
- wpa_s->global->p2p != NULL &&
- wpa_s->wpa_state != WPA_AUTHENTICATING &&
- wpa_s->wpa_state != WPA_ASSOCIATING) {
- 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 scan result processing");
- }
- }
-#endif /* CONFIG_P2P */
+ if (wpa_s->wpa_state != WPA_AUTHENTICATING &&
+ wpa_s->wpa_state != WPA_ASSOCIATING)
+ wpas_p2p_continue_after_scan(wpa_s);
break;
#endif /* CONFIG_NO_SCAN_PROCESSING */
case EVENT_ASSOCINFO: