diff options
author | Hanumantha Reddy Pothula <c_hpothu@codeaurora.org> | 2014-10-21 19:52:55 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2014-11-04 08:23:02 -0700 |
commit | 1d5457132e720760bcbec125cde6c37968c787f6 (patch) | |
tree | 46d92acd5818fb904054485cc5b4d504686f03f7 | |
parent | 9c5eeac30a1091bd4906a341ebcb83c5c5561d96 (diff) | |
download | android_frameworks_opt_net_wifi-staging/cm-12.0-caf.tar.gz android_frameworks_opt_net_wifi-staging/cm-12.0-caf.tar.bz2 android_frameworks_opt_net_wifi-staging/cm-12.0-caf.zip |
wlan: Modify sequence of events sent during DHCP phase.staging/cm-12.0-caf
Modify sequence of events sent to driver during DHCP phase, to
make sure WLAN can enter into power save only after DHCP is done.
Change-Id: Idf7ed8d6e1c011bd3b7af9f5ca9d4db46de55fb0
CRs-Fixed: 719573
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index 5e3b3f93e..c91458a7a 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -4283,8 +4283,6 @@ public class WifiStateMachine extends StateMachine { void handlePreDhcpSetup() { mDhcpActive = true; - mWifiNative.setBluetoothCoexistenceMode( - mWifiNative.BLUETOOTH_COEXISTENCE_MODE_DISABLED); // Disable power save and suspend optimizations during DHCP // Note: The order here is important for now. Brcm driver changes @@ -4293,6 +4291,9 @@ public class WifiStateMachine extends StateMachine { setSuspendOptimizationsNative(SUSPEND_DUE_TO_DHCP, false); mWifiNative.setPowerSave(false); + mWifiNative.setBluetoothCoexistenceMode( + mWifiNative.BLUETOOTH_COEXISTENCE_MODE_DISABLED); + stopBatchedScan(); WifiNative.pauseScan(); @@ -4335,16 +4336,16 @@ public class WifiStateMachine extends StateMachine { } void handlePostDhcpSetup() { - /* Restore power save and suspend optimizations */ - setSuspendOptimizationsNative(SUSPEND_DUE_TO_DHCP, true); - mWifiNative.setPowerSave(true); - mWifiP2pChannel.sendMessage(WifiP2pServiceImpl.BLOCK_DISCOVERY, WifiP2pServiceImpl.DISABLED); // Set the coexistence mode back to its default value mWifiNative.setBluetoothCoexistenceMode( mWifiNative.BLUETOOTH_COEXISTENCE_MODE_SENSE); + /* Restore power save and suspend optimizations */ + setSuspendOptimizationsNative(SUSPEND_DUE_TO_DHCP, true); + mWifiNative.setPowerSave(true); + mDhcpActive = false; startBatchedScan(); |