Do not add BSS to blacklist on local disconnection request, DO NOT MERGE

There is no point in marking a BSS temporarily blacklisted based on a
connection failure or disconnection case if that happens as a result of
a local request to disconnect. The blacklist entry could result on
unexpected BSS getting selected on the next connection attempt. In
addition, the code to try to find another BSS within the ESS could
result in scanning a single channel on the next attempt. Fix these
issues by handling the connection failure events only if we are not in
disconnected state (i.e., would try to reconnect after this
automatically).

Bug: 8785804
Change-Id: Iae119c292f5f45b78359dd67317d7d8206cb4cf7
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Do not try auto connect mechanism in disconnected state, DO NOT MERGE

This cleans up debug log by not requesting the auto connect on
dissassociation event if we are already in disconnected state and would
not try to connect anyway.

Bug: 8785804
Change-Id: I3ba6cc4c64dd714c0689a39339b6f0da5a06857e
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Mark interface disconnected on removal request, DO NOT MERGE

This cleans up debug log by not trying to process the disconnection
event as a failure that could result in blacklist addition and auto
connect attempt. These are pointless operations since the interface is
going to removed immediately after this.

Bug: 8785804
Change-Id: I2406d9b9bd9f0a83ae9fd0b0962f1134fda2bb9e
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Merge tag 'android-4.3_r3.1' of https://android.googlesource.com/platform/external/wpa_supplicant_8 into cm-10.2

Android 4.3 Release 3.1
EAP peer: Add check before calling getSessionId method

We should not call getSessionID method if it's not provided. This fixes
a regression from commit 950c5630768285e460aa336c78a18162fb3e0434 where
EAP methods that did not implement getSessionId resulted in NULL pointer
dereference when deriving the key.

Change-Id: Iff5a34c2251e1e3bd8d014a31465e187a4817551
Signed-off-by: Shijie Zhang <shijiez@qca.qualcomm.com>