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>
nl80211: Sync with mac80211-next.git

Signed-hostap: Jouni Malinen <j@w1.fi>
nl80211: Add support for QoS Map configuration

This allows nl80211-based drivers to configure QoS Mapping in both AP
and station modes.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Advertise QoS Map support based on driver capability

Do not assume the driver supports QoS Mapping, but instead, advertise
support for this only if CONFIG_INTERWORKING is defined and driver
indicates support for configuring QoS Map.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
tests: Add QoS Map test case

This verifies that QoS Map configuration and update can be completed.
Actual QoS mapping for Data frames within mac80211/cfg80211 is not yet
verified.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Update IBSS documentation to include RSN option

Signed-hostap: Jouni Malinen <j@w1.fi>
bgscan: Stop bgscan only on disassociation

Stopping bgscan on any state other than COMPLETED results
in bgscan reset (stop + start) on every rekeying operation.

Signed-hostap: Eliad Peller <eliad@wizery.com>
bgscan_learn: Avoid redundant frequencies

Some hw modes (e.g., 11b and 11g) contain the same frequencies,
causing the supp_freqs array to be populated with redundant entries.

Check for the existence of the freq before adding it.

Signed-hostap: Eliad Peller <eliad@wizery.com>
hwsim tests: Handle regdomain requests in vm scripts

In order to handle regulatory domain requests, crda needs to be
installed on the host, but we also need to install a uevent helper in
the VM so that it gets executed (since we don't run udev).

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
bgscan_learn: Fix initial interval

In case the initial signal level of the associated BSS was above the
given threshold, bgscan_learn module would begin using the
short_interval but never switch to the long_interval as there would be
no signal change event. Make the init code poll for the current signal
level and set scan_interval accordingly. This logic exists in
bgscan_simple but was missing in bgscan_learn.

Signed-hostap: Eyal Shapira <eyal@wizery.com>
bgscan_learn: Start scanning from the first freq

bgscan_learn_get_probe_freq() starts from returning the second entry in
the supp_freqs arrays. Change its logic a bit to make it start from the
first entry.

Signed-hostap: Eliad Peller <eliad@wizery.com>
AP: Use monotonic time for STA accounting

For type-safety, make sta->acct_session_start a struct os_reltime
and then use monotonic time for accounting. For RADIUS reporting,
continue to use wall clock time as specified by RFC 2869, but for
the session time use monotonic time.

Interestingly, RFC 2869 doesn't specify a timezone, so the value
is somewhat arbitrary.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
AP: Use monotonic time for PMKSA cache

Since the PMKSA cache only uses relative time, use the monotonic time
functions instead of wall time to be correct when the clock jumps.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
AP: Use monotonic time for MMIC failure/TKIP countermeasures

Wall time jumps shouldn't affect MMIC failure/TKIP countermeasures,
so use monotonic time. Change the michael_mic_failure variable to
struct os_reltime for type-safety.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
wpa_ctrl: Use monotonic time for request retry loop

The request retry loop only retries for 5 seconds, so any time
jumps would probably not affect it much, but it should be using
monotonic time nonetheless since it only cares about duration.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
EAP server: Remove SIM-DB pending timestamp

This should probably have used monotonic time for entry timestamps, but
as those aren't used at all right now, so just remove them entirely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
wpa_supplicant: Use monotonic time for SA query timeout

The SA query timeout is just a regular timeout (currently
hard-coded to 1000 TU), so use monotonic time for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
wpa_supplicant: Use monotonic time for RX/BSS times

The BSS table, scan timeout, and related functionality should use
monotonic time since they care about relative values (age) only.
Unfortunately, these are all connected, so the patch can't be split
further. Another problem with this is that it changes the driver wrapper
API. Though, it seems only the test driver is using this.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
RADIUS client: Use monotonic time

Since the RADIUS client cares about relative time (retry timeout)
only, it should use monotonic time.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
RADIUS server: Use monotonic time

The RADIUS server needs to calculate uptime, which is relative
and thus should use monotonic time.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>