aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2012-09-04 17:02:52 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-09-04 17:02:52 -0700
commitcef482f830a787f249e7719ffb7d45db19ba1feb (patch)
treef48bed420b337cec8dce0e01ab3b2ae4be27d64f
parentc5c02f1d8a39ff95f2a01e1cee7daf3c0ade6dbe (diff)
parent0531f20404b2e284d1b444d5af48b6e0c629975b (diff)
downloadexternal_wpa_supplicant_8-cef482f830a787f249e7719ffb7d45db19ba1feb.zip
external_wpa_supplicant_8-cef482f830a787f249e7719ffb7d45db19ba1feb.tar.gz
external_wpa_supplicant_8-cef482f830a787f249e7719ffb7d45db19ba1feb.tar.bz2
am 0531f204: Fix \'restore STA reconnection behavior\' cherry-pick
* commit '0531f20404b2e284d1b444d5af48b6e0c629975b': Fix 'restore STA reconnection behavior' cherry-pick
-rw-r--r--wpa_supplicant/config_ssid.h7
-rw-r--r--wpa_supplicant/wpa_supplicant.c5
-rw-r--r--wpa_supplicant/wpa_supplicant_i.h3
3 files changed, 10 insertions, 5 deletions
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index 2605ae8..45a423c 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -423,6 +423,13 @@ struct wpa_ssid {
*/
int export_keys;
+#ifdef ANDROID_P2P
+ /**
+ * assoc_retry - Number of times association should be retried.
+ */
+ int assoc_retry;
+#endif
+
#ifdef CONFIG_HT_OVERRIDES
/**
* disable_ht - Disable HT (IEEE 802.11n) for this network
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)
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 33b6258..21fe5cc 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -276,9 +276,6 @@ struct wpa_supplicant {
struct wpa_bss *current_bss;
int ap_ies_from_associnfo;
unsigned int assoc_freq;
-#ifdef ANDROID_P2P
- unsigned int assoc_retries;
-#endif
/* Selected configuration (based on Beacon/ProbeResp WPA IE) */
int pairwise_cipher;