P2P: Remove unnecessary ifdef CONFIG_NO_CONFIG_WRITE

wpa_config_write() is defined as a dummy function even if actual
operation to write the configuration file are commented out from the
build. This cleans up the code a bit and removed a compiler warning on
set-only variable.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests: Add module tests for blacklist to complete coverage

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Interworking: Prefer last added network during network selection

Previously, any network block could be used to select the BSS to connect
to when processing scan results after Interworking network selection.
This can result in somewhat unexpected network selection in cases where
credential preferences indicated that a specific network was selected,
but another network ended up getting used for the connection. While the
older networks continue to be valid, add special processing for this
initial post-interworking-connect case to get more consistent network
selection to match with the Interworking network selection result.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests: Verify Interworking network selection reconnection

This verifies that 'INTERWORKING_SELECT auto' is able to roam to a
higher priority network when executed while connected to a lower
priority network.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests: Verify Interworking network selection with no auth params

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests: Verify domain_suffix_match in a cred block

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Only try fast reconnect if network is not disabled

Previously, it would have been possible for the network to be marked
disabled and that marking to be ignored if a recoverable disconnection
reason event were processed. Avoid this by verifying network status
before trying to reconenct back to the same BSS.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests: Clear pmf parameter on reset()

This is in preparation of removing pmf parameter reset on the FLUSH
command.

Signed-off-by: Jouni Malinen <j@w1.fi>
Do not clear global pmf setting on FLUSH

This parameter was actually used in some testing cases in a way that did
not really work well with the FLUSH command ending up disabling PMF.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
nl80211: Add driver capability for GTK_NOT_USED

Many drivers support operation without GTK configured, but most (if any)
today do not advertise this. Handle this by skipping GTK cipher suite
configuration if the driver did not advertise support in order to work
around cfg80211 validation steps.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Interworking: Allow roaming partner configuration

The new roaming_partner parameter within a cred block can be used to
configure priorities for roaming partners.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
HS 2.0R2: Update Indication element to Release 2

The HS 2.0 Indication element from wpa_supplicant now includes the
release number field and wpa_supplicant shows the release number of the
AP in STATUS command (hs20=1 replaced with hs20=<release>).

The new update_identifier field in the cred block can now be used to
configure the PPS MO ID so that wpa_supplicant adds it to the Indication
element in Association Request frames.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
HS 2.0R2: Add WNM-Notification Request for Subscription Remediation

Subscription remediation notification WNM-Notification Request is now
shown in the following way in wpa_supplicant control interface:
<3>HS20-SUBSCRIPTION-REMEDIATION http://example.com/foo/

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
HS 2.0R2: Add STA support for Deauthentication Request notification

If requested, disable the network based on the HS 2.0 deauthentication
request.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
HS 2.0R2: Add Icon Request and Icon binary File ANQP elements

wpa_supplicant can request OSU icon data with "hs20_icon_request <BSSID>
<icon filename>". This transmits an Icon Request ANQP element and
processes the response in Icon Binary File ANQP elements.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
HS 2.0R2: Add OSU Providers list ANQP element

wpa_supplicant can now request OSU Providers list with "hs20_anqp_get
<BSSID> 8".

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
HS 2.0R2: Add routine for fetching OSU provider information

The new wpa_cli fetch_osu command can be used to fetch information about
all OSU providers and write that to a text file with the icons in
separate files. cancel_osu_fetch command can be used to stop ongoing OSU
provider list fetch.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
HS 2.0R2: Add GAS operation duration statistics into debug

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
HS 2.0R2: Add common OSEN definitions

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
HS 2.0R2: Add OSEN client implementation

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>