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

Commit 2af4df03 authored by Naresh Jayaram's avatar Naresh Jayaram Committed by Steve Kondik
Browse files

wifi: Disable the network based on the Deauth reason code.

Network connection failure shall happen due to various reasons
(VIZ assoc_reject, max supplicant loop iterations, authentication
failure due to wrong password, etc). For the cases apart from the
reason being assoc_reject there is no point continuing still
enabling the current profile and hence disable the same.

Change-Id: I9a0022d100dcfb1e1d1a9540ec6439ad140c06d1
CRs-fixed: 626680
parent 8778fac6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -99,6 +99,14 @@ class SupplicantStateTracker extends StateMachine {
            mWifiConfigStore.enableAllNetworks();
            mNetworksDisabledDuringConnect = false;
        }

        /* If the max supplicant loop iterations is reached or authentication
         * failure due to wrong password, then disable that network
         */
        if (disableReason == WifiConfiguration.DISABLED_AUTH_FAILURE) {
            Log.e(TAG, "reason DISABLED_AUTH_FAILURE ");
            mWifiConfigStore.disableNetwork(netId, disableReason);
        }
    }

    private void transitionOnSupplicantStateChange(StateChangeResult stateChangeResult) {