aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-09-14 00:58:22 (GMT)
committerJouni Malinen <j@w1.fi>2012-09-14 00:58:22 (GMT)
commite665ca9a8dce1386f48a2e54eb3b50834ae601e0 (patch)
tree819fc47a6c84b82b5e2872d834d0086bf9473850 /wpa_supplicant/events.c
parent762b99db7a76803d1ad274e87caa6fe870d47441 (diff)
downloadhostap-e665ca9a8dce1386f48a2e54eb3b50834ae601e0.zip
hostap-e665ca9a8dce1386f48a2e54eb3b50834ae601e0.tar.gz
hostap-e665ca9a8dce1386f48a2e54eb3b50834ae601e0.tar.bz2
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. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 6dd5787..f8aa50d 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1049,9 +1049,10 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
wpa_supplicant_notify_scanning(wpa_s, 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->sta_scan_pending) {
- 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 "
"stopped scan processing");
@@ -2412,11 +2413,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
case EVENT_SCAN_RESULTS:
wpa_supplicant_event_scan_results(wpa_s, data);
#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->wpa_state != WPA_AUTHENTICATING &&
wpa_s->wpa_state != WPA_ASSOCIATING) {
- 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 scan result processing");