path: root/wpa_supplicant/p2p_supplicant.h
diff options
authorVinay Krishna Eranna <c_veran@qti.qualcomm.com>2013-09-03 08:17:21 (GMT)
committerJouni Malinen <j@w1.fi>2013-09-03 09:43:12 (GMT)
commitb2b688d18d40cd667d0faa149b4a7172166b3bd4 (patch)
tree82b3d4b5133bed61713b783ee880f34baccc495e /wpa_supplicant/p2p_supplicant.h
parentea0e92eef571ba9770362695829f609860160e55 (diff)
P2P: Fix crash when failed to create GO interfaceaosp-kk-from-upstream
wpa_supplicant crashes if driver configuration for AP mode interface configuration fails after group negotiation. This is because of a regression from commit 1075b2957169d8f9d6dddd7679339c751dc9515b that ends up freeing the wpa_s instance from within wpa_supplicant_create_ap() without the caller knowing. Fix this by using an eloop timeout to free remove the P2P group so that wpa_supplicant_create_ap() and especially wpa_supplicant_associate() callers do not need to know about interface getting possibly removed. In addition, move the P2P specific code into p2p_supplicant.c where it really belongs. This allows the already existing group formation timeout to be used by reducing the timeout to zero. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.h')
1 files changed, 5 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.h b/wpa_supplicant/p2p_supplicant.h
index c718fba..26f5def 100644
--- a/wpa_supplicant/p2p_supplicant.h
+++ b/wpa_supplicant/p2p_supplicant.h
@@ -161,6 +161,7 @@ void wpas_p2p_remove_client(struct wpa_supplicant *wpa_s, const u8 *peer,
#ifdef CONFIG_P2P
void wpas_p2p_continue_after_scan(struct wpa_supplicant *wpa_s);
int wpas_p2p_4way_hs_failed(struct wpa_supplicant *wpa_s);
+void wpas_p2p_ap_setup_failed(struct wpa_supplicant *wpa_s);
#else /* CONFIG_P2P */
static inline void wpas_p2p_continue_after_scan(struct wpa_supplicant *wpa_s)
@@ -170,6 +171,10 @@ static inline int wpas_p2p_4way_hs_failed(struct wpa_supplicant *wpa_s)
return 0;
+static inline void wpas_p2p_ap_setup_failed(struct wpa_supplicant *wpa_s)
#endif /* CONFIG_P2P */
#endif /* P2P_SUPPLICANT_H */