summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2011-10-17 13:29:52 -0700
committerIrfan Sheriff <isheriff@google.com>2011-10-17 14:16:32 -0700
commita2a1078576187f1192e339c927478205a8bc937f (patch)
treeb5094559a51f176fd169f02fc9a23513fe5063a1 /wifi
parent63fae9d56286e7c51261a5a00755466b350efa33 (diff)
downloadframeworks_base-a2a1078576187f1192e339c927478205a8bc937f.zip
frameworks_base-a2a1078576187f1192e339c927478205a8bc937f.tar.gz
frameworks_base-a2a1078576187f1192e339c927478205a8bc937f.tar.bz2
Disconnect without CTRL-EVENT-DISCONNECTED
Handle a supplicant state change indicating disconnection even if we have missed the CTRL-EVENT-DISCONNECTED notice Bug: 5437924 Change-Id: I28e314f47f17359926c091b2015cd1fb7422fb22
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiStateMachine.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 55e9587..b76f8b9 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -2698,6 +2698,19 @@ public class WifiStateMachine extends StateMachine {
handleNetworkDisconnect();
}
transitionTo(mDriverStoppedState);
+ break;
+ }
+
+ // Supplicant can fail to report a NETWORK_DISCONNECTION_EVENT
+ // when authentication times out after a successful connection,
+ // we can figure this from the supplicant state. If supplicant
+ // state is DISCONNECTED, but the mNetworkInfo says we are not
+ // disconnected, we need to handle a disconnection
+ if (state == SupplicantState.DISCONNECTED &&
+ mNetworkInfo.getState() != NetworkInfo.State.DISCONNECTED) {
+ if (DBG) log("Missed CTRL-EVENT-DISCONNECTED, disconnect");
+ handleNetworkDisconnect();
+ transitionTo(mDisconnectedState);
}
break;
/* Do a redundant disconnect without transition */