diff options
author | Irfan Sheriff <isheriff@google.com> | 2010-12-01 11:25:36 -0800 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2010-12-01 12:05:57 -0800 |
commit | f36bde828c0e427c0dbbe543b2465114c9aff45c (patch) | |
tree | 7812e30623d639d78ef65979aeff7a260efa215d | |
parent | e23212bc89bfcb3afbf8fdb5504556ead890e1a8 (diff) | |
download | frameworks_base-f36bde828c0e427c0dbbe543b2465114c9aff45c.zip frameworks_base-f36bde828c0e427c0dbbe543b2465114c9aff45c.tar.gz frameworks_base-f36bde828c0e427c0dbbe543b2465114c9aff45c.tar.bz2 |
DO NOT MERGE Dont let supplicant stay in DORMANT state
In some situations, the supplicant stays in a DORMANT
state. This prevents a connections to a network.
As long as the driver is started and we are not in scan-only
mode, issue a reconnect to get supplicant out of DORMANT
state.
Upon failures and network disable, supplicant should get
into an INACTIVE state.
Bug: 3236920
Change-Id: If32b5bfb7fea6c69c4a461db0b2012875b6273b5
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateTracker.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java index 1284072..5540174 100644 --- a/wifi/java/android/net/wifi/WifiStateTracker.java +++ b/wifi/java/android/net/wifi/WifiStateTracker.java @@ -1038,13 +1038,18 @@ public class WifiStateTracker extends NetworkStateTracker { } handleDisconnectedState(newDetailedState, true); /** - * If we were associated with a network (networkId != -1), - * assume we reached this state because of a failed attempt - * to acquire an IP address, and attempt another connection - * and IP address acquisition in RECONNECT_DELAY_MSECS - * milliseconds. + * We should never let the supplicant stay in DORMANT state + * as long as we are in connect mode and driver is started + * + * We should normally hit a DORMANT state due to a disconnect + * issued after an IP configuration failure. We issue a reconnect + * after RECONNECT_DELAY_MSECS in such a case. + * + * After multiple failures, the network gets disabled and the + * supplicant should reach an INACTIVE state. + * */ - if (mRunState == RUN_STATE_RUNNING && !mIsScanOnly && networkId != -1) { + if (mRunState == RUN_STATE_RUNNING && !mIsScanOnly) { sendMessageDelayed(reconnectMsg, RECONNECT_DELAY_MSECS); } else if (mRunState == RUN_STATE_STOPPING) { stopDriver(); |