P2P: Cancel group formation timeout on client connection

It was possiblle for the group formation timeout to be left running even
after the P2P Client connected to the group if the WPS provisioning step
was not completed cleanly (e.g., due to WSC_Done not getting received
from the client). There is no need to remove the group in such case due
to the initial group formation timeout, so work around this by removing
that timeout on data connection.

CRs-Fixed: 538026
Git-commit: eab2b50dc83e1d14dcb573dfc9b10fc6a9cb1cdd
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: I15e65a8e2436db5c408d5960bff6ba7af16f62c1
P2P: Extend group formation timeout on GO to first data connection

Previously, GO considered the group to be fully formed at the completed
of WPS provisioning step. This would leave the group running until idle
timeout (which may not be enabled) or explicit removal if the client
fails to connect for any reason. Since the client is expected to connect
immediately after the WPS provisioning step, extend group formation
timeout to cover that period until the first successfully completed data
connection. This allows the GO to remove the group automatically if the
client devices does not connect within P2P_MAX_INITIAL_CONN_WAIT_GO (10)
seconds.

Change-Id: Ia33cbf738490d89263c80a39d9044500a847b470
CRs-Fixed: 538026
Git-commit: 41f853235fe1d1fad1acecc0ee5dfe81c872c6b2
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Use group formation timeout on persistent group GO

Previously, GO considered the group to be fully re-invoked after
starting beaconing on successful invitation exchange. This would leave
the group running until idle timeout (which may not be enabled) or
explicit removal if the client fails to connect for any reason. Since
the client is expected to connect immediately after the invitation
exchange that ends with status=0 (i.e., either client initiated the
exchange or it responded with success), extend group formation timeout
to cover that period until the first successfully completed data
connection. This allows the GO to remove the group automatically if the
client devices does not connect within
P2P_MAX_INITIAL_CONN_WAIT_GO_REINVOKE (15) seconds.

Change-Id: I5a9622e46ff032a8297a55ba6e6d724a42834762
CRs-Fixed: 538026
Git-commit: bbc6c729a58897e9265d53d53677b3ddeda4ff94
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
TDLS: Tear down TDLS using wpas_drv_tlds_oper() if not external

When the device indicates to take care of TDLS operations the TDLS
setup is done calling wpas_drv_tdls_oper(). This patch does a similar
thing for the teardown. This fixes failure of teardown:

"TDLS: Could not find peer <mac> for link Teardown"

Signed-hostap: Arend van Spriel <arend@broadcom.com>
Git-commit: 4ed8d954dd4f714ac648b25fc3ec260592fda41b
Git-repo : git://w1.fi/srv/git/hostap.git
CRs-fixed: 555255

Change-Id: I9134b3edece3c6e9d7fb5328910d4c9c41df4fb7
P2P: Increase Invitation Request timeouts

In noisy environment peer may take more time to send Invitation
Response so increase Invitation Response timeout to 500 ms in success
case and also increase Invitation Request action wait time to 500 ms.
This makes the Invitation Request case use the same timeout with GO
Negotiation.

CRs-Fixed: 538699
Git-commit: 63ce59dea8c6b458d9a0c24e91f971f461f17b79
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: Idd3dea0e7ed16cd7564b34dfe279a49f16f021d4
hostapd: Make install path configurable

Makefile always installs to /usr/local/sbin and on some
platforms, /usr/local/sbin 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/sbin.

Change-Id: I9b5c460e62778159491209edc357f8f9888fd653
Add disable_scan_offload parameter to wpa_supplicant.conf

By default, wpa_supplicant tries to offload scanning if the driver
indicates support for this (sched_scan). This configuration
parameter can be used to disable this automatic offloading mechanism.

Change-Id: I0dff8d8acbfb04f7b47e342b37c93d381eefb7cc
CRs-fixed: 545719
Merge "P2P: Cancel group formation timeout on client connection"
Merge "P2P: Extend group formation timeout on GO to first data connection"
Merge "P2P: Use group formation timeout on persistent group GO"
Merge "TDLS: Tear down TDLS using wpas_drv_tlds_oper() if not external"
Merge "P2P: Increase Invitation Request timeouts"
Merge "Add disable_scan_offload parameter to wpa_supplicant.conf"
Merge "Add disable_scan_offload parameter to wpa_supplicant.conf"
P2P: Show P2P flag in BSS entries also based on Beacon frames

It is possible that a P2P GO has been discovered through a non-P2P scan
that did not return P2P IE in Probe Response frames. To cover those
cases, check also Beacon frame (if received) for P2P IE.

Change-Id: If1d855022785f5d801e2d91c1d2fcac35760f717
CRs-Fixed: 535523
Git-commit: bb50ae439686fb69f52288a618e6d176462ab726
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Show p2p flag in debug info for scan results

This makes it easier to confirm that P2P capabilities for a GO has been
discovered properly.

Change-Id: If214f9c8ea492fb2f13a0dbb98fd964f7d118531
CRs-Fixed: 535523
Git-commit: b16696ff72969329c9e4507f9bbcaf5882b492f7
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Allow GO to be discovered based on Beacon frame

This fixes some P2P-join-a-group cases where GO may have been discovered
based on passive scan or non-P2P scan. P2P IEs may have been received
from a Beacon frame in such a case and that information can be used to
create a P2P peer entry, e.g., to allow provision discovery exchange to
be completed.

Change-Id: I8502c61fa0f149f7636708458f5e51ca627ac6b7
CRs-Fixed: 535523
Git-commit: aaeb9c98e6aad64bbf92c7cb6ef4531c039b8a1d
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Do not drop P2P IEs from BSS table on non-P2P scans

This could happen when non-P2P station interface runs a scan without P2P
IE in the Probe Request frame. P2P GO would reply to that with a Probe
Response that does not include P2P IE. Do not update the IEs in this BSS
entry to avoid such loss of information that may be needed for P2P
operations to determine group information.

Change-Id: I2af1f4487a358da57b885ff63e879aaea4fd2508
CRs-Fixed: 535523
Git-commit: ff57398fcab817374dac975aaab3eef5bf64f381
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Do not allow P2P client connection without P2P IE from GO

P2P-GROUP-STARTED event depends on having enough information about the
group available. To avoid incomplete information from being delivered to
upper layers, do not accept scan results without P2P IE (e.g., from a
non-P2P scan) for P2P client association process. This can be of use for
some join-a-group cases where non-P2P scans have generated the BSS entry
for the GO.

Change-Id: I42bc5c5cc17d7786eaf4018c2774bb13bb6e4be2
CRs-Fixed: 535523
Git-commit: b72e14e599785e377881a2a8cd26b42f90bdc5f6
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Allow persistent group determination based on Beacon frame

P2P IE may be available from a Beacon frame from a GO even if we have
not yet received a Probe Response frame with P2P IE from that GO. Since
all the needed information for determining the GO's P2P Device Address
and group capabilities are available, use that information instead of
displaying incomplete group information.

Change-Id: I4eb179351b1d104d2ca31023c3405aaa570d21fc
CRs-Fixed: 535523
Git-commit: 5df7414b04fc0bfa0abea1a2662746d348104972
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>