TDLS: Do not reenable TDLS link on retransmitted setup frame

A reenable of the TDLS link while the host driver is already processing
the same (due to the retransmitted M2/M3 frames) might result in a
failed TDLS setup handshake due to some host driver's implementation.
Thus, issue enable link only when the peer's TDLS status signifies no
prior link (tpk_success=0).

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

Change-Id: Ie3f3375527b2f2c1bd6c75bc3c976388e5356d6e
eap_proxy: Extend Android.mk to support additional libraries

Allow addition static and shared libraries to be specified from the
eap_proxy_*.mk file for Android build. In addition use $(LOCAL_PATH) as
a prefix for that Android makefile part.

Change-Id: Ie441bc3280addedc9916eab587dd78d58957da2b
CRs-fixed: 585456
Git-commit: f7579502a65d0868275dc476f946a6bf74cddf02
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Fix channel preference use for MCC p2p_connect

Only force_freq was used in the wpas_p2p_set_own_freq_preference() call
which allowed the P2P module channel re-selection to ignore the
preference for using a channel we are already using. Fix this by setting
either force_freq or pref_freq as the preference based on which one is
set. This allows p2p_ignore_shared_freq parameter to be used whether to
prefer the shared frequency in this case.

Change-Id: I0efd3caf3b4c86033f7900306cba34500bea6e28
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit:  1b665cbf513bd56e6e4f8bde4c2d4dcec774ea6f
Git-repo: git://w1.fi/srv/git/hostap.git
wpa_supplicant_8: Don't expire peers when in P2P_PENDING_PD.

A p2p_expiration_timeout during Provisional Discovery (when PD
request is sent before p2p_connect) shall result in the device
entry getting removed.Blocking the same from getting removed .
(cherry picked from commit 5a5ea05885457412de6f1dabce73d92865c5a75e)

Change-Id: Ic25ea00000ce22b34cdcdb618239ff8c6097ae39
hostapd: Make install path configurable

Makefile always installs to /usr/local/bin and on some platforms,
/usr/local/bin is not in default search path.  Modified the
makefile such that bin path can be configurable so that build
system can pass appropriate path for installation. If bin path is
not specified then by default binaries are installed in
/usr/local/bin.

Change-Id: I9b5c460e62778159491209edc357f8f9888fd653
P2P: Clear pending group formation data on group removal

It was possible for the wpa_s->show_group_started and wpa_s->go_params
to be left set when a P2P group was removed before group formation had
completed. In case a separate P2P group interface was not used, this
could rsult in all future scans using the hardcoded DIRECT-* SSID and as
such, not find the network they were trying to find. Fix this by
clearing these P2P parameters on group removal.

CRs-Fixed: 591716
Git-commit: c092d83e268a0e328943b78df1ea05fea9c0de86
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Track whether scan was started by us or an external program

This can be used to improve scan behavior in cases external
programs request scans directly from the driver.

CRs-Fixed: 570640
Git-commit: a5f40eff189d7f939f6434455ee63554ddb3c3ae
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <j@w1.fi>
Change-Id: I4af18ace907f4c736cec48b41f925a462d816a56
Ignore externally triggered scan results with scan_res_handler.

wpa_s->scan_res_handler is set only for cases where a scan operation is
requested for a specific purpose. As such, this callback should only be
called when a scan result from a scan that was triggered by
wpa_supplicant is processed.

CRs-Fixed: 570640
Git-commit: 06f9acce189b20daee8fe8fd46cd849425304130
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <j@w1.fi>
Change-Id: I75a34a885b19ef0115d47aba6c066a9672f71cf7
Do not use results from externally requested scan for network selection

It may not always be desirable to trigger reassociation or network
change based on scan results from externally to wpa_supplicant trigger
scan operations. Skip network selection and roaming determination if the
received scan result is known to be triggered by something external to
wpa_supplicant. The control interface SCAN command can be used to
request wpa_supplicant to determine the best network.

CRs-Fixed: 570640
Git-commit: 015af91fea2ec780cb44914bfc0cbc39932cf60d
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <j@w1.fi>
Change-Id: I9b2aba83dc5ecad36b426157ce0d4daa1d95fcbb
P2P: Extend the listen time based on the active concurrent session

A P2P Device while in the Listen state waiting to respond for the
obtained group negotiation request shall give a fair chance for other
concurrent sessions to use the shared radio by inducing an idle time
between the successive listen states. However, if there are no
concurrent operations, this idle time can be reduced.

CRs-Fixed: 606348
Git-commit: a2d63657603b8f0714274f34bea45cb5d0c0a7b9
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: Ifbc6b7687889055764ef462abb710ef9a6c580a8
Make frequency range list routines more general

This allows the frequency range list implementation to be shared for
other purposes.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: af8a827b90ad504711bf1c156b715103878a934d
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I1e436301d79fc0d7e88eb93c3198a7ee17dadd3c
CRs-Fixed: 598923
nl80211: Make wpa_driver_nl80211_data::first_bss pointer

This is needed to allow the first BSS to be removed and replaced by the
next one in the list.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 834ee56f7862fed6eb60c84b9ba7cae9dd64d4a7
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: Iac50995762c41018b112d4834c9c7b8ca141b7fd
CRs-Fixed: 598923
Sync with wireless-testing.git include/uapi/linux/nl80211.h

Signed-hostap: Jouni Malinen <j@w1.fi>
Git-commit: 350574339560d75f3d037d9f9c0e03a1d9d4fad0
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: Ifcb308413aac4686c2fdcb0fdb00b5684410a153
CRs-Fixed: 598923
Increase global ctrl_iface buffer to same size as per-interface

Since the global ctrl_iface can be used with IFNAME= prefix to send
commands to be processed by per-interface code, it should have the same
(well, close to same since the prefix takes some space) limits on
command length as the per-interface ctrl_iface. Increase the buffer from
256 to 4096 to achieve this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 8615bdfac90174c3730ae5e6607b85f8bbec847
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I8b5859457b488d83619262e39c41bf8d677b34a0
CRs-fixed: 607171
nl80211: Sync with wireless-testing.git

The driver_nl80211.c changes are needed to avoid compiler warnings
with two frequency attributes pointing to the same value.

Signed-hostap: Jouni Malinen <j@w1.fi>
Git-commit: 9fcd300db65f9c19563fcd5b862eac992db50efd
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I4a730c9bc1b4d89b356e9d515245f0e3c58626c5
CRs-Fixed: 598923
nl80211: Sync with mac80211-next.git

Signed-hostap: Jouni Malinen <j@w1.fi>
Git-commit: 74ddd64b26355cb45cd5e2c38266f3ac7f83c97f
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: Id9e063163b7abbb3a1da5964afc4698f71f89a8f
CRs-Fixed: 598923
nl80211: Initial support for vendor commands and events

Print into the debug log the list of vendor commands and events that the
driver supports. In addition, add a generic handler for vendor events.
This can be extended for each vendor/subcmd.

Signed-hostap: Jouni Malinen <j@w1.fi>
Git-commit: 17b79e65a9491a02a3d28411f1432481e8af564b
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: Ic649ebc25a30f0a6e3bfaae58fb917217f28f3c6
nl80211: Fix sizeof check in vendor command/event handling

Fix sizeof in a validity comparison of nl80211_vendor_cmd_info size. The
incorrect version happened to work on 64-bit builds due the structure
being eight octets, but this was incorrect and would not used with
32-bit builds.

Signed-hostap: Max Stepanov <Max.Stepanov@intel.com>
Git-commit: 080cc445df897592f493d33224f6c3ec01b4a821
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: Iba566678c00ecca3d18f79b6a101660e79258488
CRs-Fixed: 598923
Add a header file defining QCA OUI and vendor extensions

This file is used as a registry of identifier assignments from the
Qualcomm Atheros OUI 00:13:74 for purposes other than MAC address
assignment. One of the first uses will be for nl80211 vendor
commands/events which is reason for the preparation change in
driver_nl80211.c

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 1682c6236017f28b8fdb3b791565c835e988a559
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I25a164a2541a57511c9e737d582b14975fc550b3
CRs-Fixed: 598923
P2P: Apply unsafe frequency rules to available channels

This adds a QCA vendor specific nl80211 event to allow the driver to
indicate a list of frequency ranges that should be avoided due to
interference or possible known co-existance constraints. Such
frequencies are marked as not allowed for P2P use to force groups to be
formed on different channels.

If a P2P GO is operating on a channel that the driver recommended not to
use, a notification about this is sent on the control interface and
upper layer code may decide to tear down the group and optionally
restart it on another channel. As a TODO item, this could also be changed
to use CSA to avoid removing the group.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 253f2e37957e726677d545f5598aad56d7d33bf5
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I2608f48bf1f127a5d2b379ce381de15f900f4f29
CRs-Fixed: 598923