diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2012-09-04 16:52:41 -0700 |
---|---|---|
committer | The Android Automerger <android-build@android.com> | 2012-09-06 13:35:42 -0700 |
commit | e488da341f1264a7d5e053d7b16f9cc1f3c6af1e (patch) | |
tree | 5a78fba1e1779338ee6aee4636f36d89fa46b69f | |
parent | 6b24b49269d3adeb71f381b244a8417529d39047 (diff) | |
download | external_wpa_supplicant_8-e488da341f1264a7d5e053d7b16f9cc1f3c6af1e.zip external_wpa_supplicant_8-e488da341f1264a7d5e053d7b16f9cc1f3c6af1e.tar.gz external_wpa_supplicant_8-e488da341f1264a7d5e053d7b16f9cc1f3c6af1e.tar.bz2 |
Fix 'restore STA reconnection behavior' cherry-pick
BUG: b/6400311
Change-Id: I7b90ab9b5430b92e9e4e5702c3b1805a6bbc0b9a
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r-- | wpa_supplicant/config_ssid.h | 7 | ||||
-rw-r--r-- | wpa_supplicant/wpa_supplicant.c | 5 | ||||
-rw-r--r-- | wpa_supplicant/wpa_supplicant_i.h | 3 |
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; |