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

Commit 70bce28c authored by Hamad Kadmany's avatar Hamad Kadmany Committed by Linux Build Service Account
Browse files

Support WiGig SoftAP mode

WiGig softAP needed in standalone mode and FST modes.

In standalone mode, new API to start/stop WiGig softAP is added.

In FST mode, when 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 187cb988
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -227,11 +227,21 @@ interface INetworkManagementService
     */
    void startAccessPoint(in WifiConfiguration wifiConfig, String iface);

    /**
     * Start Wigig Access Point
     */
    void startWigigAccessPoint();

    /**
     * Stop Wifi Access Point
     */
    void stopAccessPoint(String iface);

    /**
     * Stop Wigig Access Point
     */
    void stopWigigAccessPoint();

    /**
     * Set Access Point config
     */
+20 −0
Original line number Diff line number Diff line
@@ -1505,6 +1505,16 @@ public class NetworkManagementService extends INetworkManagementService.Stub
        }
    }

    @Override
    public void startWigigAccessPoint() {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        try {
            mConnector.execute("softap", "qccmd", "set", "enable_wigig_softap=1");
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
        }
    }

    private static String getSecurityType(WifiConfiguration wifiConfig) {
        switch (wifiConfig.getAuthType()) {
            case KeyMgmt.WPA_PSK:
@@ -1551,6 +1561,16 @@ public class NetworkManagementService extends INetworkManagementService.Stub
        }
    }

    @Override
    public void stopWigigAccessPoint() {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
        try {
            mConnector.execute("softap", "qccmd", "set", "enable_wigig_softap=0");
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
        }
    }

    @Override
    public void setAccessPoint(WifiConfiguration wifiConfig, String wlanIface) {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
+8 −2
Original line number Diff line number Diff line
@@ -220,11 +220,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();