aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.c
diff options
context:
space:
mode:
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index cb5b42f..e1ad4d9 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -582,8 +582,9 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
wpa_supplicant_state_txt(state));
#ifdef ANDROID_P2P
- if(state == WPA_ASSOCIATED || (state <= WPA_INACTIVE))
- wpa_s->assoc_retries = 0;
+ if(state == WPA_ASSOCIATED && wpa_s->current_ssid) {
+ wpa_s->current_ssid->assoc_retry = 0;
+ }
#endif /* ANDROID_P2P */
if (state != WPA_SCANNING)