summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2010-10-12 10:50:07 -0700
committerIrfan Sheriff <isheriff@google.com>2010-10-12 11:30:22 -0700
commitbf844308a2fca21ee590fbf1b5686495c9ca2aeb (patch)
treed2e400f227b61b8dfb65ff8daf2c8ef90df17600 /wifi
parent692cac9fdd7b179ba807351772fdf2339c000dfe (diff)
downloadframeworks_base-bf844308a2fca21ee590fbf1b5686495c9ca2aeb.zip
frameworks_base-bf844308a2fca21ee590fbf1b5686495c9ca2aeb.tar.gz
frameworks_base-bf844308a2fca21ee590fbf1b5686495c9ca2aeb.tar.bz2
fix start driver for corner cases DO NOT MERGE
- Force a start when in RUN_STATE_STOPPING since there could have a stop driver in that state - When a driver started event is received is received from the supplicant, force a reconnect since we could have out of an intermediate stop event that would have forced the run state to STOPPED Bug: 3087621 Change-Id: I3652747a267a3da8349a9fd5c4065d3837a0c545
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiStateTracker.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 281077c..06f6696 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -1285,15 +1285,13 @@ public class WifiStateTracker extends NetworkStateTracker {
if (macaddr != null) {
mWifiInfo.setMacAddress(macaddr);
}
- if (mRunState == RUN_STATE_STARTING) {
- mRunState = RUN_STATE_RUNNING;
- if (!mIsScanOnly) {
- reconnectCommand();
- } else {
- // In some situations, supplicant needs to be kickstarted to
- // start the background scanning
- scan(true);
- }
+ mRunState = RUN_STATE_RUNNING;
+ if (!mIsScanOnly) {
+ reconnectCommand();
+ } else {
+ // In some situations, supplicant needs to be kickstarted to
+ // start the background scanning
+ scan(true);
}
}
break;
@@ -1613,12 +1611,10 @@ public class WifiStateTracker extends NetworkStateTracker {
}
public synchronized boolean restart() {
- if (mRunState == RUN_STATE_STOPPED) {
+ if (isDriverStopped()) {
mRunState = RUN_STATE_STARTING;
resetConnections(true);
return startDriver();
- } else if (mRunState == RUN_STATE_STOPPING) {
- mRunState = RUN_STATE_STARTING;
}
return true;
}