Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff9ee917 authored by Nalla Kartheek's avatar Nalla Kartheek Committed by Steve Kondik
Browse files

Wi-Fi: Set BTCOEXMODE_DISABLED irrespective of BT's connection state

BTCOEXMODE_DISABLE has to be triggered during the DHCP phase even
on an active BT connection to ensure that Wi-Fi is given
preference over the BT.
This commit ensures the same
CRs-Fixed: 695307

Change-Id: I1eb979f03696831cb8f9e3a14b8a62f724347b64
parent 3e94615b
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -2374,27 +2374,9 @@ public class WifiStateMachine extends StateMachine {

    void handlePreDhcpSetup() {
        mDhcpActive = true;
        if (!mBluetoothConnectionActive) {
            /*
             * There are problems setting the Wi-Fi driver's power
             * mode to active when bluetooth coexistence mode is
             * enabled or sense.
             * <p>
             * We set Wi-Fi to active mode when
             * obtaining an IP address because we've found
             * compatibility issues with some routers with low power
             * mode.
             * <p>
             * In order for this active power mode to properly be set,
             * we disable coexistence mode until we're done with
             * obtaining an IP address.  One exception is if we
             * are currently connected to a headset, since disabling
             * coexistence would interrupt that connection.
             */
            // Disable the coexistence mode
            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