Include Extended Capabilities element based on scan results

Add Extended Capabilities element to association request only if the AP
included this element in Beacon/Probe Response frames. This is a
workaround to address interoperability issues with some older APs that
do not seem to be able to handle Extended Capabilities element in
(Re)Association Request frames.

CRs-Fixed: 540084
Git-commit: 8b3b803ab9fe69650da7e3b2ee9e44f0f054ee0a
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: I4c314a628a3e114fdbe35b34eb3d3338a41810aa
TDLS: Clean up wpa_tdls_teardown_link() uses

Making this function be used only for external setup case simplifies the
implementation and makes core wpa_supplicant calls in ctrl_iface.c and
events.c consistent.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: f130b105ec4462b55e829dffe8b3c6b6003227ca
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I9af7d3bf70dcf1731df5173d65c862073f5e877c
CRs-fixed: 552276
TDLS: Use helper function for disable link operation

This is called from number of locations and it is more efficient to use
a new helper function instead of wpa_tdls_disable_link() that would do
peer address search from the list of peers.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 83d3fdb7c61fc5be1c7172079faf5cd59ec9b935
Git-repo : git://w1.fi/srv/git/hostap.git
CRs-fixed: 552276

Change-Id: I46220186457c40099ff110a8ed165cec6235c660
TDLS: Use wpa_tdls_disable_peer_link() to avoid peer search

There is no need to go through the peer list when we already have a
pointer to the specific peer entry.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 1a0a2ce39c3886555f8214fae9385c924e174eca
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: Iaa6e480c4989a3c79c5153efd2c4abe2911622f8
CRs-fixed: 552276
TDLS: Use wpa_tdls_disable_peer_link() in TPK M1 processing

This function is used only with external setup, so this can cleaned up
to use simpler design.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 33d85b63b59fcb1c460ede64ececb45c9ea2cabc
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: If0b254b0ff571ca584fc15b2d0a9cddf4004009f
CRs-fixed: 552276
TDLS: Do not start concurrent TDLS setup

A new TDLS request shall transmit TPK M1 frame with a unique INonce.
Thus a new explicit request would fail an ongoing TDLS negotiation with
the error "TDLS: FTIE SNonce in TPK M3 does not match with FTIE SNonce
used in TPK M1" if the peer happens to receive two M1 frames before an
M3 frame. Check for the ongoing negotiation with the peer and do not
start a new one if we are already in a setup negotiation with the peer.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 5bfd7e91685e65977c8db72afdca0cab310f8667
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I599f8cc9e7aff684f55590cfac547e0e1540a09d
CRs-fixed: 552276
Merge "Include Extended Capabilities element based on scan results"
Merge "TDLS: Clean up wpa_tdls_teardown_link() uses"
Merge "TDLS: Use helper function for disable link operation"
Merge "TDLS: Use wpa_tdls_disable_peer_link() to avoid peer search"
Merge "TDLS: Use wpa_tdls_disable_peer_link() in TPK M1 processing"
Merge "TDLS: Do not start concurrent TDLS setup"
Merge branch 'jb_mr2' of git://codeaurora.org/platform/external/wpa_supplicant_8 into cm-10.2

Change-Id: I2b37453bc5b7022cabea29c2da432694952fbd55