aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-01-08 20:13:17 (GMT)
committerJouni Malinen <j@w1.fi>2015-01-08 20:43:48 (GMT)
commit8f2cf379233bf4e8fc5580c7a03858a7b5581368 (patch)
tree4701f76b923201f71c6aa6bd70b098283e3fb803 /wpa_supplicant/events.c
parentcd9548c02f2863ef2d74fa59cfe324cea78ef5de (diff)
downloadhostap-8f2cf379233bf4e8fc5580c7a03858a7b5581368.zip
hostap-8f2cf379233bf4e8fc5580c7a03858a7b5581368.tar.gz
hostap-8f2cf379233bf4e8fc5580c7a03858a7b5581368.tar.bz2
P2P: Indicate reason=UNAVAILABLE for group netdev going down
There is a race condition between receiving an AP stopped event and netdev down event. These resulted in different group removal reasons on a GO device (UNAVAILABLE for stop AP event coming first and REQUESTED for netdev event first). Make this more consistent by reporting UNAVAILABLE for both possible cases. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 983c2ce..3c295c8 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3400,7 +3400,11 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
* it assuming an external entity will start a
* new session if needed.
*/
- wpas_p2p_disconnect(wpa_s);
+ if (wpa_s->current_ssid &&
+ wpa_s->current_ssid->p2p_group)
+ wpas_p2p_interface_unavailable(wpa_s);
+ else
+ wpas_p2p_disconnect(wpa_s);
break;
}
if (wpa_s->p2p_scan_work && wpa_s->global->p2p &&