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

Commit b8d116a5 authored by Vinit Deshapnde's avatar Vinit Deshapnde
Browse files

Flush scan results et al after band change

This change flushes all bss data after a band change (because it
is potentially invalid). We do scan for new data just after we've
established connectivity on the new band.

Bug: 7053587

Change-Id: I8ab9d0bbc5c3f8f383c2b7868349634085cf94c1
parent ef50a1a0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -388,6 +388,10 @@ public class WifiNative {
        return doStringCommand("PKTCNT_POLL");
    }

    public void bssFlush() {
        doBooleanCommand("BSS_FLUSH");
    }

    public boolean startWpsPbc(String bssid) {
        if (TextUtils.isEmpty(bssid)) {
            return doBooleanCommand("WPS_PBC");
+2 −0
Original line number Diff line number Diff line
@@ -2497,6 +2497,8 @@ public class WifiStateMachine extends StateMachine {
                    if (DBG) log("set frequency band " + band);
                    if (mWifiNative.setBand(band)) {
                        mFrequencyBand.set(band);
                        // flush old data - like scan results
                        mWifiNative.bssFlush();
                        //Fetch the latest scan results when frequency band is set
                        startScanNative(WifiNative.SCAN_WITH_CONNECTION_SETUP);
                    } else {