Fix QoS Map Configure frame use

The QoS Map Set element was passed in full to the driver instead of just
the payload of the element. This resulted in the updated QoS Map being
rejected. Validate the element id/len and send only the payload to the
driver.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Short scan wait to speed up the group re-invocation

The shorter 250 ms wait for the next scan request can be used also for
the case of persistent group re-invocation instead of just formation of
a new group. This speeds up the process and makes this more robust
especially in cases where the GO is using MCC.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
hwsim tests: Check kernel messages for lockdep complaints

Lockdep complaints are never good, so check for them in the
kernel messages, not just for warnings and bugs.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
dbus_new: Add documentation for D-Bus TDLS methods

Signed-hostap: Paul Stewart <pstew@chromium.org>
Add Wi-Fi Direct to the build configuration example

In addition, include Wi-Fi Direct support for Android builds by
default.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
STA: Cancel sched_scan while initiating wps_reassoc

Scan initiated from wps_nfc command context was ketp on
getting rescheduled due to an on-going scheduled scan. So
cancel sched_scan before issuing a reassociation scan.

Signed-hostap: Jithu Jance <jithu@broadcom.com>
hostapd: Fix interface enabling/disabling and DFS

The 'started' state was tracked incorrectly. It also broke DFS
as it was using hostapd_enable/disable_iface() functions.

Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
Fix compiler warning for OpenSSL without HAVE_OCSP

Commit 080585c01a1e0ffc42577dd10d475f3ab01d0280 added ssl_ctx outside
ifdef HAVE_OCSP block that was the only user for this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Fix and work around some MinGW compilation issues

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Use monotonic clock for relative time for eloop if available

Relative time shouldn't be calculated based on gettimeofday
because that clock can jump (e.g., when the time is adjusted
by the system administrator.)

On systems where that is available, use CLOCK_BOOTTIME (on
fairly recent Linux systems, this clock takes into account
the time spend suspended) or CLOCK_MONOTONIC (on Linux and
some POSIX systems, this clock is just freely running with
no adjustments.)

Reported-by: Holger Schurig <holgerschurig@gmail.com>
Signed-hostap: Johannes Berg <johannes.berg@intel.com>
tests: Verify that re-invoked P2P group is identified as persistent

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
VHT: Fix memory leak in STA entry

Commit de3cdf354a30256ece16866ff5a283b66e1471ae adding copying of the
STA's VHT capabilities into the STA entry on the AP. This was done in
allocated memory, but that new memory allocation was not freed anywhere.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
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).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
hostapd: Fix set beacon in multiple BSSID scenario

Check if the BSS interface has started before setting beacon.
Lack of this condition can cause segmantation fault.

Signed-hostap: Marek Kwaczynski <marek.kwaczynski@tieto.com>
hostapd: Set proper VHT capabilities

Set VHT capabilities defined in config file instead only supported
by the driver.

Signed-hostap: Marek Kwaczynski <marek.kwaczynski@tieto.com>
Android: Clean entire socket directory

Despite interface (and group) related sockets are not used
for control, they are created and may be left.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Android: Add P2P/WPS wrappers for private lib

Android uses a vendor specific library for implementing couple of driver
interface functions. Add the wrapper code to allow that mechanism to be
used.

Signed-hostap: Jouni Malinen <j@w1.fi>
Android: Add driver_cmd for arbitrary driver commands

This is a mechanism used in Android to extend driver interface in vendor
specific ways. This is included only for the purpose of Android
compatibility. Proper interface commands should be used for any new
functionality.

Signed-hostap: Jouni Malinen <j@w1.fi>
Android: P2P: Remember country locale

This updates P2P modules based on the Android specific
DRIVER COUNTRY command.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Android: wpa_supplicant: Use Ver 0.8.X as default

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>