Fix updating multi-link info from scan cache

Currently multi-link info is set from scan cache for each of the
supplicant state changes during connection. Only for
SupplicantState.ASSOCIATED, link info is updated from supplicant. The
state transition for a connection is SCANNING, AUTHENTICATING,
ASSOCIATING, ASSOCIATED, FOUR_WAY_HANDSHAKE, GROUP_HANDSHAKE and
finally COMPLETED. So a transitions past ASSOCIATED to COMPLETED always
overwrites the multi-link info from scan cache which was previously
updated for ASSOCIATED state.

Fix it by setting multi-link info from scan cache only during states
ASSOCIATED or earlier.

Bug: 273355708
Test: atest com.android.server.wifi
Change-Id: I76d2ef252e74a8640a5e8799c755653d7c9b7949
3 files changed