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

Commit 86bcbcfe authored by Dedy Lansky's avatar Dedy Lansky Committed by Linux Build Service Account
Browse files

Tethering: support for FST in SoftAP mode

In case FST enabled (persist.fst.rate.upgrade.en system property),
tether (including running dhcp server) over bonding driver instead of the
wifi driver

Change-Id: If5d9555fddb321c38803dc77319243abfabe8c05
parent d85e7560
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import android.os.INetworkManagementService;
import android.os.Looper;
import android.os.Message;
import android.os.UserHandle;
import android.os.SystemProperties;
import android.telephony.TelephonyManager;
import android.util.Log;

@@ -217,11 +218,17 @@ public class Tethering extends BaseNetworkObserver {
    void updateConfiguration() {
        String[] tetherableUsbRegexs = mContext.getResources().getStringArray(
                com.android.internal.R.array.config_tether_usb_regexs);
        String[] tetherableWifiRegexs = mContext.getResources().getStringArray(
                com.android.internal.R.array.config_tether_wifi_regexs);
        String[] tetherableWifiRegexs;
        String[] tetherableBluetoothRegexs = mContext.getResources().getStringArray(
                com.android.internal.R.array.config_tether_bluetooth_regexs);

        if (SystemProperties.getInt("persist.fst.rate.upgrade.en", 0) == 1) {
            tetherableWifiRegexs = new String[] {"bond0"};
        } else {
            tetherableWifiRegexs = mContext.getResources().getStringArray(
                com.android.internal.R.array.config_tether_wifi_regexs);
        }

        int ifaceTypes[] = mContext.getResources().getIntArray(
                com.android.internal.R.array.config_tether_upstream_types);
        Collection<Integer> upstreamIfaceTypes = new ArrayList();