[PATCH] P2P: notify about disconnection only when needed
Eliad Peller
eliad
Mon Mar 5 06:01:51 PST 2012
wpas_notify_state_changed() notifies about disconnection
when new_state < WPA_ASSOCIATED, without checking the
old state. This finally might fire the p2p idle group
timer during the connection attempt.
Signed-hostap: Eliad Peller <eliad at wizery.com>
intended-for: hostap-1
---
wpa_supplicant/notify.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index da98a14..8d9b669 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -82,7 +82,7 @@ void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
#ifdef CONFIG_P2P
if (new_state == WPA_COMPLETED)
wpas_p2p_notif_connected(wpa_s);
- else if (new_state < WPA_ASSOCIATED)
+ else if (old_state >= WPA_ASSOCIATED && new_state < WPA_ASSOCIATED)
wpas_p2p_notif_disconnected(wpa_s);
#endif /* CONFIG_P2P */
--
1.7.6.401.g6a319
More information about the Hostap
mailing list