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

Commit e3e145a9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Tether: fix bt-pan and wlan0 timing issue"

parents d609fd17 634ac05a
Loading
Loading
Loading
Loading
+2 −21
Original line number Diff line number Diff line
@@ -278,29 +278,10 @@ public class Tethering extends BaseNetworkObserver {
                    sm.start();
                }
            } else {
                if (isUsb(iface)) {
                    // ignore usb0 down after enabling RNDIS
                if (isUsb(iface) || isBluetooth(iface) || isWifi(iface) ) {
                    // ignore usb0, bt-pan or wlan0 down after enabling tethering
                    // we will handle disconnect in interfaceRemoved instead
                    if (VDBG) Log.d(TAG, "ignore interface down for " + iface);
                } else if (isWifi(iface) && (mWifiManager != null) &&
                              mWifiManager.getWifiStaSapConcurrency()) {
                    int wifiApState = 0;
                    wifiApState = mWifiManager.getWifiApState();

                    // Ignore AP interface down after enabling STA connection.
                    // If STA connects to same  band the SAP is enabled, the
                    // driver stops SAP before it proceeds for STA connection
                    // hence ignore interface down. After STA connection,
                    // driver starts SAP on STA channel.

                    if ((wifiApState == WifiManager.WIFI_AP_STATE_DISABLING) ||
                       (wifiApState == WifiManager.WIFI_AP_STATE_DISABLED)) {
                        if (VDBG) Log.d(TAG, "Got interface down for " + iface);
                        sm.sendMessage(TetherInterfaceSM.CMD_INTERFACE_DOWN);
                        mIfaces.remove(iface);
                    } else {
                        if (VDBG) Log.d(TAG, "ignore interface down for " + iface);
                    }
                } else if (sm != null) {
                    sm.sendMessage(TetherInterfaceSM.CMD_INTERFACE_DOWN);
                    mIfaces.remove(iface);