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>
Merge "Revert "Add Support for proprietary EAP-PROXY implementation.""
Merge "TDLS: Do not reenable TDLS link on retransmitted setup frame"
Merge "eap_proxy: Extend Android.mk to support additional libraries"
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
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
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>
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
Merge "P2P: Fix channel preference use for MCC p2p_connect"
Merge "wpa_supplicant_8: Don't expire peers when in P2P_PENDING_PD."
Merge "hostapd: Make install path configurable"
Merge "P2P: Clear pending group formation data on group removal"
GAS: Update timeout from TX status handler

This allow GAS operations to be fine-tuned based what happens with GAS
query TX. Failed queries are timed out immediately and acknowledged
queries are given some more time to account for possible TX queue
latencies.

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

Change-Id: Ifec4f2be4f97b03bc4fca7413dc2464f1e2f15c0
GAS: Delay GAS query Tx while another query is in progress

It would be possible to issue another GAS query when a previous one is
still in progress and this could result in conflicting offchannel
operations. Prevent that by delaying GAS query initiation until the
previous operation has been completed.

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

Change-Id: I93b84beca42cb6437130b843153e511193dce333
GAS: Delay GAS query Tx while scanning/connecting

Offchannel operations needed for a GAS query can conflict with ongoing
scan/connection progress, so delay GAS queries if such an operation is
in progress on the current interface or any virtual interface sharing
the same radio.

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

Change-Id: I21adf72091a10270473e885f373fe001627f3d8e
GAS: Do not start new scan operation during an ongoing GAS query

These operations can have conflicting offchannel requirements, so wait
with a new scan trigger until a pending GAS query has been completed.

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

Change-Id: I2ef2fd6562fc92f1d0d03c3d15b3b868573566cc
GAS: Add support for multiple pending queries for the same destination

Need to use the pointer to the current ongoing query instead of matching
from the pending list based on the destination address so that we get
the correct query instance when processing the TX status report.

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

Change-Id: I9dff09b992be6cbcc9b11a021f595bf92da725ce
Skip normal scan when PNO is already in progress

Scan request failures are observed in wpa_supplicant debug log when
Android framework starts PNO scan in driver via ctrl interface command
'set pno 1' and wpa_supplicant also tries to issue a scan request after
PNO has started in the driver.

Some drivers may reject a normal scan request when PNO is already in
progress. wpa_supplicant should consider PNO status before issuing start
scan request to the driver. Otherwise, wpa_supplicant will get failures
from driver for the scan request and it will end up rescheduling scan
request in periodic interval and get a start scan request failure for
each attempt.

In order to avoid unnecessary scan attempt when PNO scan is already
running, PNO status is checked before issuing scan request to driver.

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

Change-Id: I5def860c5e8d571d54ede8112eeeeab57e19b7ab
wpa_supplicant: Schedule PNO on completion of ongoing sched_scan

When start PNO request comes from control interface, wpa_supplicant
should wait until ongoing sched_scan (triggered by wpa_supplicant)
gets cancelled. Issuing cancel sched_scan and start PNO scan
one after another from pno_start() would lead wpa_supplicant to clear
wps->sched_scanning flag while getting sched_scan stopped event
from driver for cancel sched_scan request. In fact, PNO scan will
be in progress in driver and wpa_s->sched_scanning will not be set
in such cases.

In addition to this change, RSSI threshold limit is passed as part of
start sched_scan request. This was previously set only in pno_start(),
but the same parameter should be available for generic sched_scan calls
as well and this can now be reached through the new PNO start sequence.

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

Change-Id: I7b9a3c1c24ff6519124ad2b2734227801e011b75