eap_proxy: EAP-SIM feature for single SIM.

EAP-SIM, EAP-AKA and EAP-AKA_PRIME feature request for
single SIM.

Change-Id: I037827b485bc9acd6f01a6a5ea4053548713cda9
CRs-fixed: 585456
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
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
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