summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRockchip2015-06-26 16:06:03 +0800
committerRockchip2015-06-26 16:06:03 +0800
commit81a0c38530e3d124fff6a072b518876e9a3ce34f (patch)
tree9b30f004eed64c7afa127c089e7924778bdb1020
parent7440be8ea1263b710b55b060543cf3e1dfa71411 (diff)
Wifi: wifi STOP only been enabled when kernel can enter suspend. fix some error.
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index 2146ba8..b2da96c 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -1216,7 +1216,7 @@ public class WifiStateMachine extends StateMachine {
if (syncGetWifiState() == WIFI_STATE_ENABLED) {
switch (step) {
case 1:
- if (mNetworkInfo.getState() == NetworkInfo.State.CONNECTED) {
+ if (onemore || mNetworkInfo.getState() == NetworkInfo.State.CONNECTED) {
if (onemore)
waitTime = getWlanWaitTime(3);
else {
@@ -5666,6 +5666,10 @@ public class WifiStateMachine extends StateMachine {
if (DBG) log("Already in delayed stop");
break;
}
+ if (mWlanSleepIntent != null && getWifiState() == 0) {
+ log("Wifi driver is disabled STOP. Ignore CMD_STOP_DRIVER cmd.");
+ break;
+ }
/* disconnect right now, but leave the driver running for a bit */
mWifiConfigStore.disableAllNetworks();
if (mWlanSleepIntent != null) {