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

Commit 3bbbebfa authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Get SoftAP interface from wifi.ap.interface prop" into ics

parents 74a82726 3fd5168f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ public class WifiStateMachine extends StateMachine {
    private static final boolean DBG = false;

    /* TODO: This is no more used with the hostapd code. Clean up */
    private static final String SOFTAP_IFACE = "wl0.1";
    private String mSoftApIface;

    private WifiMonitor mWifiMonitor;
    private INetworkManagementService mNwService;
@@ -583,6 +583,8 @@ public class WifiStateMachine extends StateMachine {
        mDefaultSupplicantScanIntervalMs = mContext.getResources().getInteger(
                com.android.internal.R.integer.config_wifi_supplicant_scan_interval);

        mSoftApIface = SystemProperties.get("wifi.ap.interface", "wl0.1");

        mContext.registerReceiver(
            new BroadcastReceiver() {
                @Override
@@ -1768,12 +1770,12 @@ public class WifiStateMachine extends StateMachine {
        new Thread(new Runnable() {
            public void run() {
                try {
                    mNwService.startAccessPoint(config, mInterfaceName, SOFTAP_IFACE);
                    mNwService.startAccessPoint(config, mInterfaceName, mSoftApIface);
                } catch (Exception e) {
                    loge("Exception in softap start " + e);
                    try {
                        mNwService.stopAccessPoint(mInterfaceName);
                        mNwService.startAccessPoint(config, mInterfaceName, SOFTAP_IFACE);
                        mNwService.startAccessPoint(config, mInterfaceName, mSoftApIface);
                    } catch (Exception e1) {
                        loge("Exception in softap re-start " + e1);
                        sendMessage(CMD_START_AP_FAILURE);