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

Commit 34fe7914 authored by Irfan Sheriff's avatar Irfan Sheriff
Browse files

Handle loss of supplicant events at start

If the supplicant events are lost even before connection,
we stay stuck without doing IP address.
The earlier implementation used polling at connection to handle
this case.
A disconnect after connection handles this cleanly.

Bug: 2876987
Change-Id: I7509c5f332f87b91e1ff8438cf859a0e49df2e6d
parent f54a8d7c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2960,6 +2960,15 @@ public class WifiStateTracker extends HierarchicalStateMachine implements Networ
                transitionTo(mScanModeState);
            } else {
                WifiNative.setScanResultHandlingCommand(CONNECT_MODE);
                /* If supplicant has already connected, before we could finish establishing
                 * the control channel connection, we miss all the supplicant events.
                 * Disconnect and reconnect when driver has started to ensure we receive
                 * all supplicant events.
                 *
                 * TODO: This is a bit unclean, ideally the supplicant should never
                 * connect until told to do so by the framework
                 */
                WifiNative.disconnectCommand();
                WifiNative.reconnectCommand();
                transitionTo(mConnectModeState);
            }