]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
3 years agotests: RNR element generation
Jouni Malinen [Tue, 9 Nov 2021 16:24:46 +0000 (18:24 +0200)] 
tests: RNR element generation

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoRNR: Do not allow FILS Discovery and unsolicited Probe Response simultaneously
Aloka Dixit [Tue, 27 Jul 2021 23:42:26 +0000 (16:42 -0700)] 
RNR: Do not allow FILS Discovery and unsolicited Probe Response simultaneously

Reduced neighbor report has a field to indicate whether unsolicited
Probe Response transmission is active. Add a check to return failure if
both FILS discovery and unsolicited Probe Response are enabled at the
same time to ensure that RNR includes valid data.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoRNR: Allow Probe Response frame for a colocated 6 GHz AP
Muna Sinada [Tue, 27 Jul 2021 23:42:25 +0000 (16:42 -0700)] 
RNR: Allow Probe Response frame for a colocated 6 GHz AP

When a Probe Request frame from a station includes an SSID matching that
of a co-located 6 GHz AP, AP should respond with a Probe Response frame
that includes Reduced Neighbor Report element containing information
regarding the requested BSS.

Signed-off-by: Muna Sinada <msinada@codeaurora.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoRNR: Update Beacon frames for 6 GHz colocation
Aloka Dixit [Tue, 27 Jul 2021 23:42:24 +0000 (16:42 -0700)] 
RNR: Update Beacon frames for 6 GHz colocation

Update 2.4/5 GHz Beacon frames every time Beacon frames for co-located 6
GHz AP(s) are set. This is required for 6 GHz out-of-band discovery so
that lower band Beacon frames will include RNR element with 6 GHz AP
information irrespective of the AP bring-up order. Similarly, RNR is
included in FILS Discovery frames by default in 6 GHz-only mode,
updating the Beacon frames will remove it when co-located 2.4/5 GHz
interfaces are brought up.

This change also ensures that the changes in 6 GHz AP configuration such
as new channel and bandwidth get reflected in the lower bands Beacon
frames.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoRNR: Addition in Beacon, Probe Response, and FILS Discovery frames
John Crispin [Tue, 27 Jul 2021 23:42:23 +0000 (16:42 -0700)] 
RNR: Addition in Beacon, Probe Response, and FILS Discovery frames

Add Reduced Neighbor Report element in Beacon, Probe Response, and FILS
Discovery frames.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoRNR: Additions for a 6 GHz AP
John Crispin [Tue, 27 Jul 2021 23:42:22 +0000 (16:42 -0700)] 
RNR: Additions for a 6 GHz AP

Include Reduced Neighbor Report element in Beacon and Probe Response
frames by default if the reporting AP is 2.4/5 GHz and it is co-located
with a 6 GHz AP. Similarly, include RNR by default in FILS Discovery
frames if the AP is a standalone 6 GHz AP.

Signed-off-by: John Crispin <john@phrozen.org>
Co-developed-by: Aloka Dixit <alokad@codeaurora.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoRNR: Add co-located BSSes
John Crispin [Tue, 27 Jul 2021 23:42:21 +0000 (16:42 -0700)] 
RNR: Add co-located BSSes

Calculate the length and include data for the BSSes active on the same
radio as the reporting BSS in the Reduced Neighbor Report element. This
element is included in Beacon and Probe Response frames.

Signed-off-by: John Crispin <john@phrozen.org>
Co-developed-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Co-developed-by: Muna Sinada <msinada@codeaurora.org>
Signed-off-by: Muna Sinada <msinada@codeaurora.org>
Co-developed-by: Aloka Dixit <alokad@codeaurora.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoRNR: Add data from neighbor database
John Crispin [Tue, 27 Jul 2021 23:42:20 +0000 (16:42 -0700)] 
RNR: Add data from neighbor database

Include data from the existing neighbor database in the Reduced Neighbor
Report element in Beacon frames if the configuration option 'rnr' is
enabled for the BSS.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Muna Sinada <msinada@codeaurora.org>
Co-developed-by: Aloka Dixit <alokad@codeaurora.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoRNR: Add configuration option
John Crispin [Tue, 27 Jul 2021 23:42:19 +0000 (16:42 -0700)] 
RNR: Add configuration option

Adds configuration option 'rnr' to enable the reduced neighbor report
elements in Beacon and Probe Response frames.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoRNR: Define element format
John Crispin [Tue, 27 Jul 2021 23:42:18 +0000 (16:42 -0700)] 
RNR: Define element format

Add definitions for the fields described in IEEE Std 802.11-2020 and
IEEE Std 802.11ax-2021, 9.4.2.170 Reduced Neighbor Report element.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Muna Sinada <msinada@codeaurora.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoShare a common error path for SET_NEIGHBOR control interface command
Jouni Malinen [Mon, 8 Nov 2021 21:42:02 +0000 (23:42 +0200)] 
Share a common error path for SET_NEIGHBOR control interface command

Instead of constructing a custom error handler freeing the same set of
allocated memory areas on various error cases, share the success path
freeing implementation for the error cases as well.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoRNR: Add bss_parameters to the neighbor_db
John Crispin [Tue, 27 Jul 2021 23:42:17 +0000 (16:42 -0700)] 
RNR: Add bss_parameters to the neighbor_db

Add a new field to include BSS Parameter subfield in the neighbor
database as described in IEEE Std 802.11ax-2021, Figure 9-632a (BSS
Parameters subfield format). This field holds information related to
multiple BSSID, access point co-location, and 20 TU probe response
active/inactive state.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoRNR: Short SSID assignment
John Crispin [Tue, 27 Jul 2021 23:42:16 +0000 (16:42 -0700)] 
RNR: Short SSID assignment

Calculate and store short SSID in hostapd_data context during config
load time and in neighbor report.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
3 years agoUpdate AKMP and proto for driver-based SME while roaming
Vinay Gannevaram [Thu, 28 Oct 2021 17:51:00 +0000 (23:21 +0530)] 
Update AKMP and proto for driver-based SME while roaming

After roaming to a new AP using driver-based SME and roaming trigger,
AKMP and proto were not updated in wpa_sm. Hence, update AKMP and proto
used with roamed AP when association event received from the driver in
SME offloaded to the driver scenario to avoid incorrect AKMP details in
wpa_supplicant similarly to how the cipher suite updates were added in
commit 2b3e64a0fb5f ("Update ciphers to address GTK renewal failures
while roaming") .

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoAdd QCA vendor attribute to configure ARP/NS offload feature
Will Huang [Tue, 2 Nov 2021 07:01:19 +0000 (15:01 +0800)] 
Add QCA vendor attribute to configure ARP/NS offload feature

Add a QCA vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_ARP_NS_OFFLOAD to
configure ARP/NS offload feature.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoOpenSSL: Fix build with OpenSSL 1.0.2
Jouni Malinen [Wed, 3 Nov 2021 14:02:07 +0000 (16:02 +0200)] 
OpenSSL: Fix build with OpenSSL 1.0.2

OpenSSL 1.0.2 did not define the 'bytes' argument to
X509_NAME_add_entry_by_NID() to be const like it did for the previously
used X509_NAME_add_entry_by_txt(). Add a backwards compatible version of
this call to avoid compilation issues.

Fixes: d51939f2c4b5 ("DPP: Move CSR routines to use crypto.h")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agotests: Fix DPP test cases for BoringSSL
Cedric Izoard [Fri, 29 Oct 2021 09:05:33 +0000 (11:05 +0200)] 
tests: Fix DPP test cases for BoringSSL

When checking DPP capabilities the Brainpool flag was not always set
when needed, leading to run a test with the Brainpool curves not
supported by BoringSSL.

Use a short form for the DER length of EC privateKey with NIST P-521
curve. Indeed BoringSSL returns an error when parsing DER sequence 30 81
50 ... because the length 81 50 could have been encoded as 50 and
according comment in BoringSSL:
ITU-T X.690 section 10.1 (DER length forms) requires encoding the
length with the minimum number of octets.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Replace dpp_bootstrap_key_der() with crypto_ec_key_get_subject_public_key()
Cedric Izoard [Fri, 29 Oct 2021 09:05:32 +0000 (11:05 +0200)] 
DPP: Replace dpp_bootstrap_key_der() with crypto_ec_key_get_subject_public_key()

As BoringSSL version of i2d_PUBKEY() doesn't respect the
POINT_CONVERSION_COMPRESSED flag redefine a specific
crypto_ec_key_get_subject_public_key() version for BoringSSL based on
dpp_bootstrap_key_der().

The only other user of crypto_ec_key_get_subject_public_key() is SAE-PK
for which the public key should also be formatted using compressed
format.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Use ECDH from crypto.h
Cedric Izoard [Fri, 29 Oct 2021 09:05:31 +0000 (11:05 +0200)] 
DPP: Use ECDH from crypto.h

Use crypto.h API to implement ECDH in DPP. This needs a new
initialization function in crypto.h to initialize an ECDH with a given
EC key.

Using crypto_ecdh_set_peerkey() to generate the ECDH secret in an
intermediate and dynamically allocated buffer removed the need for the
DPP-specific workaround for inconsistent length returned by
EVP_PKEY_derive() since that crypto_ecdh_set_peerkey() implementation
already had functionality for covering the changing secret_len value
from commit d001fe31ab0a ("OpenSSL: Handle EVP_PKEY_derive() secret_len
changes for ECDH").

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoOpenSSL: Clear the correct flag in crypto_ec_key_get_ecprivate_key()
Cedric Izoard [Fri, 29 Oct 2021 09:05:30 +0000 (11:05 +0200)] 
OpenSSL: Clear the correct flag in crypto_ec_key_get_ecprivate_key()

In case the public key was not included in the EC private key ASN.1
sequence, the flag that was cleared was not the right one. Fix this by
using EC_KEY_set_enc_flags() for both setting and clearing the
EC_PKEY_NO_PUBKEY flag instead of trying to clear that with the
unrelated EC_KEY_clear_flags() function.

Fixes: 2d5772e691f6 ("DPP: Factorize conversion to ASN.1 ECPrivateKey")
Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoIgnore CONFIG_WIFI_DISPLAY without CONFIG_P2P
Masashi Honma [Sun, 31 Oct 2021 23:03:37 +0000 (08:03 +0900)] 
Ignore CONFIG_WIFI_DISPLAY without CONFIG_P2P

Wi-Fi Display functionality needs P2P to be enabled. Ignore
CONFIG_WIFI_DISPLAY if CONFIG_P2P is not enabled for the build. This
avoids following compilation issue with invalid build configuration:

../src/ap/ap_drv_ops.c: In function 'hostapd_build_ap_extra_ies':
../src/ap/ap_drv_ops.c:163:10: error: 'struct hostapd_data' has no member named 'p2p_group'
  163 |  if (hapd->p2p_group) {
      |          ^~
../src/ap/ap_drv_ops.c:165:35: error: 'struct hostapd_data' has no member named 'p2p_group'
  165 |   a = p2p_group_assoc_resp_ie(hapd->p2p_group, P2P_SC_SUCCESS);
      |                                   ^~

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
3 years agoFix compiler error on CONFIG_AP without CONFIG_P2P builds
Masashi Honma [Sun, 31 Oct 2021 23:03:37 +0000 (08:03 +0900)] 
Fix compiler error on CONFIG_AP without CONFIG_P2P builds

/usr/bin/ld: /home/honma/git/hostap/build/wpa_supplicant/ap.o: in function `wpas_conf_ap_he_6ghz':
/home/honma/git/hostap/wpa_supplicant/ap.c:245: undefined reference to `wpas_p2p_get_sec_channel_offset_40mhz'

Fixes: e5173e8b12a8 ("P2P: Enable multiple channel widths for P2P in 6 GHz band")
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
3 years agowolfSSL: Fix a link error when WPS NFC is disabled
Masashi Honma [Wed, 27 Oct 2021 01:10:57 +0000 (10:10 +0900)] 
wolfSSL: Fix a link error when WPS NFC is disabled

/usr/bin/ld: /home/honma/git/hostap/build/wpa_supplicant/src/wps/wps.o: in function `wps_deinit':
/home/honma/git/hostap/wpa_supplicant/../src/wps/wps.c:184: undefined reference to `dh5_free'
/usr/bin/ld: /home/honma/git/hostap/build/wpa_supplicant/src/wps/wps_common.o: in function `wps_derive_keys':
/home/honma/git/hostap/wpa_supplicant/../src/wps/wps_common.c:83: undefined reference to `dh5_derive_shared'
/usr/bin/ld: /home/honma/git/hostap/wpa_supplicant/../src/wps/wps_common.c:84: undefined reference to `dh5_free'
/usr/bin/ld: /home/honma/git/hostap/build/wpa_supplicant/src/wps/wps_attr_build.o: in function `wps_build_public_key':
/home/honma/git/hostap/wpa_supplicant/../src/wps/wps_attr_build.c:68: undefined reference to `dh5_free'
/usr/bin/ld: /home/honma/git/hostap/wpa_supplicant/../src/wps/wps_attr_build.c:69: undefined reference to `dh5_init'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1892: wpa_supplicant] Error 1

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
3 years agoDPP: Use crypto_ec_key_get_subject_public_key() when possible
Cedric Izoard [Mon, 28 Jun 2021 16:25:25 +0000 (18:25 +0200)] 
DPP: Use crypto_ec_key_get_subject_public_key() when possible

Keep the locally defined ASN.1 sequence DPP_BOOTSTRAPPING_KEY for now to
avoid losing a workaround for BoringSSL from commit 746c1792ac28 ("DPP:
Build bootstrapping key DER encoding using custom routine").

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Move CSR routines to use crypto.h
Cedric Izoard [Mon, 28 Jun 2021 16:25:37 +0000 (18:25 +0200)] 
DPP: Move CSR routines to use crypto.h

Add basic CSR API in crypto.h.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Move dpp_pkcs7_certs() into crypto_pkcs7_get_certificates()
Cedric Izoard [Mon, 28 Jun 2021 16:25:38 +0000 (18:25 +0200)] 
DPP: Move dpp_pkcs7_certs() into crypto_pkcs7_get_certificates()

Move implementation of dpp_pkcs7_certs() into OpenSSL specific files.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Move debug print of EC key to crypto.h
Cedric Izoard [Mon, 28 Jun 2021 16:25:36 +0000 (18:25 +0200)] 
DPP: Move debug print of EC key to crypto.h

Move the crypto lib specific print of an EC key in dpp_debug_print_key()
to crypto.h.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Remove direct call to OpenSSL in dpp_test_gen_invalid_key()
Cedric Izoard [Mon, 28 Jun 2021 16:25:35 +0000 (18:25 +0200)] 
DPP: Remove direct call to OpenSSL in dpp_test_gen_invalid_key()

Instead of generating EC point with random coordinates, generate a
valid EC point and then corrupt the coordinates after exporting them
in binary format.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Add crypto_ec_key_cmp() in crypto.h and use it
Cedric Izoard [Mon, 28 Jun 2021 16:25:34 +0000 (18:25 +0200)] 
DPP: Add crypto_ec_key_cmp() in crypto.h and use it

This gets rid of one more direct OpenSSL call in the DPP implementation.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Use crypto_ec_key_group() to compare EC key's group
Cedric Izoard [Mon, 28 Jun 2021 16:25:33 +0000 (18:25 +0200)] 
DPP: Use crypto_ec_key_group() to compare EC key's group

Remove one more direct call to OpenSSL using crypto_ec_key_group() to
compare group of c-sign-key and ppKey when creating Configurator from
backup data.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Use crypto API for reconfig part
Cedric Izoard [Mon, 28 Jun 2021 16:25:32 +0000 (18:25 +0200)] 
DPP: Use crypto API for reconfig part

Rewrite functions related to reconfig feature using EC point/bignum
primitives defined in crypto.h API.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Update connector signing to use crypto.h
Cedric Izoard [Mon, 28 Jun 2021 16:25:31 +0000 (18:25 +0200)] 
DPP: Update connector signing to use crypto.h

Add two new functions in crypto.h that "wrap" around already defined
signing function with (r,s) interface instead of DER Ecdsa-Sig-Value.

Using those functions implies to compute the hash to sign manually
before.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Remove unused EVP_PKEY_CTX variable
Cedric Izoard [Mon, 28 Jun 2021 16:25:30 +0000 (18:25 +0200)] 
DPP: Remove unused EVP_PKEY_CTX variable

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Use crypto.h for authentication computation
Cedric Izoard [Mon, 28 Jun 2021 16:25:30 +0000 (18:25 +0200)] 
DPP: Use crypto.h for authentication computation

Rewrite dpp_auth_derive_l_responder/initiator() using EC point/bignum
primitives defined in crypto.h API.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Update PKEX part to use crypto.h API
Cedric Izoard [Mon, 28 Jun 2021 16:25:28 +0000 (18:25 +0200)] 
DPP: Update PKEX part to use crypto.h API

Rewrite EC point/bignum computation done in PKEX protocol using EC
point/bignum primitives already defined in crypto.h and couple of small
new helper functions.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Use crypto_ec_key_parse_priv() when possible
Cedric Izoard [Mon, 28 Jun 2021 16:25:27 +0000 (18:25 +0200)] 
DPP: Use crypto_ec_key_parse_priv() when possible

Function crypto_ec_key_parse_priv() already parses ASN.1 ECPrivateKey so
use it when possible.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Use crypto_ec_key_parse_pub() in dpp_get_subject_public_key()
Cedric Izoard [Mon, 28 Jun 2021 16:25:26 +0000 (18:25 +0200)] 
DPP: Use crypto_ec_key_parse_pub() in dpp_get_subject_public_key()

The extra validation steps through the OpenSSL X509 API are not really
necessary here and they most duplicate checks that happen implicitly
within d2i_PUBKEY() and the EVP_PKEY_get0_EC_KEY() checks in
crypto_ec_key_parse_pub().

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Move dpp_set_pubkey_point_group() to crypto.h
Cedric Izoard [Mon, 28 Jun 2021 16:25:24 +0000 (18:25 +0200)] 
DPP: Move dpp_set_pubkey_point_group() to crypto.h

Move code of dpp_set_pubkey_point_group() into crypto.h API. This
function initializes an EC public key using coordinates of the EC point
in binary format.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoOpenSSL: Add Brainpool curves to crypto_ec_key_group()
Cedric Izoard [Mon, 28 Jun 2021 16:25:23 +0000 (18:25 +0200)] 
OpenSSL: Add Brainpool curves to crypto_ec_key_group()

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Replace dpp_get_pubkey_point() with crypto_ec_key_get_pubkey_point()
Cedric Izoard [Mon, 28 Jun 2021 16:25:23 +0000 (18:25 +0200)] 
DPP: Replace dpp_get_pubkey_point() with crypto_ec_key_get_pubkey_point()

Move code of dpp_get_pubkey_point() to a crypto library specific
function crypto_ec_key_get_pubkey_point().

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Factorize conversion to ASN.1 ECPrivateKey
Cedric Izoard [Mon, 28 Jun 2021 16:25:22 +0000 (18:25 +0200)] 
DPP: Factorize conversion to ASN.1 ECPrivateKey

Add crypto_ec_key_get_ecprivate_key() function in crypto.h and use it
when possible in DPP code.

This function converts a struct crypto_ec_key into a DER encoded ASN.1
ECPrivateKey.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoOpenSSL: Mark crypto_ec_key_gen() key compressed
Cedric Izoard [Mon, 28 Jun 2021 16:25:21 +0000 (18:25 +0200)] 
OpenSSL: Mark crypto_ec_key_gen() key compressed

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Move dpp_gen_keypair() to crypto
Cedric Izoard [Mon, 28 Jun 2021 16:25:21 +0000 (18:25 +0200)] 
DPP: Move dpp_gen_keypair() to crypto

Move code in dpp_gen_keypair() to function crypto_ec_key_gen() in
crypto.h.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoDPP: Replace EVP_PKEY by struct crypto_ec_key
Cedric Izoard [Mon, 28 Jun 2021 16:25:20 +0000 (18:25 +0200)] 
DPP: Replace EVP_PKEY by struct crypto_ec_key

To remove direct dependency to OpenSSL in DPP replace EVP_PKEY
by struct crypto_ec_key in all structures and function prototypes.

All direct calls to EVP_PKEY_free() are replaced by calls to
crypto_ec_key_deinit().

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoOpenSSL: Use EVP_PKEY as struct crypto_ec_key
Cedric Izoard [Mon, 28 Jun 2021 16:25:19 +0000 (18:25 +0200)] 
OpenSSL: Use EVP_PKEY as struct crypto_ec_key

Remove definition of struct crypto_ec_key and directly cast struct
crypto_ec_key * to EVP_PKEY * (and vice versa).

Indeed EVP_PKEY already has a pointer to EC_KEY and removing this
intermediate structure allows smoother transition in removing direct
OpenSSL dependency in DPP.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoComplete documentation in crypto.h
Cedric Izoard [Mon, 28 Jun 2021 16:25:18 +0000 (18:25 +0200)] 
Complete documentation in crypto.h

Add missing documentation for crypto_ecdh and crypt_ec_key functions.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years agoSAE: Fix sm->cur_pmksa assignment
Hu Wang [Mon, 25 Oct 2021 10:58:38 +0000 (16:28 +0530)] 
SAE: Fix sm->cur_pmksa assignment

Commit b0f457b6191 ("SAE: Do not expire the current PMKSA cache entry")
depends on sm->cur_pmksa to determine if it is the current PMKSA cache
entry, but sm->cur_pmksa was not always correct for SAE in the current
implementation.

Set sm->cur_pmksa in wpa_sm_set_pmk() (which is used with SAE), and skip
clearing of sm->cur_pmksa for SAE in wpa_find_assoc_pmkid(). This latter
case was added by commit c2080e8657f8 ("Clear current PMKSA cache
selection on association/roam") for driver-based roaming indication and
Suite B, so skipping it for SAE should be fine.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoAdd QCA vendor attribute to configure priority of vendor scan
Shiva Krishna Pittala [Fri, 1 Oct 2021 08:35:00 +0000 (14:05 +0530)] 
Add QCA vendor attribute to configure priority of vendor scan

Add the attribute QCA_WLAN_VENDOR_ATTR_SCAN_PRIORITY to configure the
priority of vendor scan relative to other scan requests. Add the valid
values that this attribute can take.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agotests: Configuration file comment with "" after #
Jouni Malinen [Fri, 22 Oct 2021 14:45:14 +0000 (17:45 +0300)] 
tests: Configuration file comment with "" after #

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoFix handling of complex configuration lines with mixed "" and #
xinpeng wang [Tue, 14 Sep 2021 05:09:20 +0000 (13:09 +0800)] 
Fix handling of complex configuration lines with mixed "" and #

The original code wants to remove # comments unless they are within a
double quoted string, but it doesn’t consider the "" after #, for
example in the following line: a=b #"a=c"

Signed-off-by: xinpeng wang <wangxinpeng@uniontech.com>
3 years agoeloop: Extend overflow check in eloop_register_timeout() to cover usec
xinpeng wang [Mon, 13 Sep 2021 09:14:15 +0000 (17:14 +0800)] 
eloop: Extend overflow check in eloop_register_timeout() to cover usec

Processing of usec could result in an additional +1 increment to sec and
that might overflow. Extend the previously used overflow check to cover
this special case as well.

Signed-off-by: xinpeng wang <wangxinpeng@uniontech.com>
3 years agotests: Add regulatory database to VMs
Johannes Berg [Thu, 23 Sep 2021 15:05:10 +0000 (17:05 +0200)] 
tests: Add regulatory database to VMs

Add a common well-known regulatory database to the test VMs during runs
to remove one thing to have correct in the host.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agotests: BSS_TM_REQ with dialog_token parameter
Jouni Malinen [Fri, 22 Oct 2021 14:14:20 +0000 (17:14 +0300)] 
tests: BSS_TM_REQ with dialog_token parameter

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoWNM: Allow specifying dialog token for BSS transition request
David Bauer [Wed, 6 Oct 2021 00:21:46 +0000 (02:21 +0200)] 
WNM: Allow specifying dialog token for BSS transition request

Adds the ability to specify the dialog token of a WNM BSS Transition
Management Request frame via the hostapd control interface.

For this, the new 'dialog_token' option can be used with the BSS_TM_REQ
command. It accepts values as an 8 bit unsigned integer. If not
specified, the dialog token is set to 1 like before.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agoUse pkg-config for libpcsclite linkage flags
Reinhard Tartler [Thu, 21 Oct 2021 10:26:00 +0000 (12:26 +0200)] 
Use pkg-config for libpcsclite linkage flags

Using pkg-config for libpcsclite can provide more accurate linking
flags.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
3 years agosystemd: Order wpa_supplicant after dbus
Stefan Lippers-Hollmann [Thu, 21 Oct 2021 10:20:29 +0000 (12:20 +0200)] 
systemd: Order wpa_supplicant after dbus

Make sure that D-Bus isn't shut down before wpa_supplicant, as that would
also bring down wireless links which are still holding open NFS shares.

Debian bug: https://bugs.debian.org/785579
systemd upstream bug: https://bugs.freedesktop.org/show_bug.cgi?id=89847

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
3 years agoRemove extra slash from BIN/INC/LIBDIR defaults
Andrej Shadura [Thu, 21 Oct 2021 10:00:03 +0000 (12:00 +0200)] 
Remove extra slash from BIN/INC/LIBDIR defaults

Every usage of these variables appends an extra slash, so keeping
a slash in the default values leads to double slashes in resulting
paths.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
3 years agoReplace "native" with a more specific description
Arowa Suliman [Wed, 20 Oct 2021 23:44:25 +0000 (16:44 -0700)] 
Replace "native" with a more specific description

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agowpa_supplicant: hostapd: Remove man-in-the-middle
Arowa Suliman [Wed, 20 Oct 2021 23:44:24 +0000 (16:44 -0700)] 
wpa_supplicant: hostapd: Remove man-in-the-middle

Replace man-in-the-middle attacks with on-path attacks which
is gender-neutral and commonly used.

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoDPP2: Do not try to remove Controller TCP connection twice on error
Jouni Malinen [Mon, 18 Oct 2021 21:23:09 +0000 (00:23 +0300)] 
DPP2: Do not try to remove Controller TCP connection twice on error

These code paths on the Controller were calling dpp_connection_remove()
twice for the same connection in the error cases. That would result in
double-freeing of the memory, so fix this by remove the
dpp_connection_remove() call from the called function and instead,
remove the connection in dpp_controller_rx() error handling.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agotests: DPP Controller management in hostapd over interface addition/removal
Jouni Malinen [Mon, 18 Oct 2021 21:15:21 +0000 (00:15 +0300)] 
tests: DPP Controller management in hostapd over interface addition/removal

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoDPP2: Clean up Controller on hostapd interface removal
Jouni Malinen [Mon, 18 Oct 2021 21:04:46 +0000 (00:04 +0300)] 
DPP2: Clean up Controller on hostapd interface removal

Stop the DPP Controller instance, if one is started, when the hostapd
interface that was used to start that Controller is removed. This is
needed to remove the control pointers that point to the soon-to-be-freed
hostapd structures. This fixes an issue where a Controller operation
with multiple interfaces could have resulted in references to freed
memory if an interface is removed without explicitly stopping the DPP
Controller.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agomacsec_qca: Support macsec secy id getting from driver
leiwei [Tue, 10 Aug 2021 07:18:14 +0000 (15:18 +0800)] 
macsec_qca: Support macsec secy id getting from driver

Use the new nss_macsec_secy_id_get() function, if available, instead of
the hardcoded ifname to secy_id mapping.

Signed-off-by: leiwei <leiwei@codeaurora.org>
3 years agoproxyarp: Fix compilation with Hotspot 2.0 disabled
David Bauer [Wed, 6 Oct 2021 00:21:05 +0000 (02:21 +0200)] 
proxyarp: Fix compilation with Hotspot 2.0 disabled

The disable_dgaf config field is only available in case hostapd is
compiled with Hotspot 2.0 support (CONFIG_HS20=y), however Proxy-ARP
(CONFIG_PROXYARP=y) does not depend on Hotspot 2.0.

Only add the code related to this config field when Hotspot 2.0 is
enabled to fix compilation with the aformentioned preconditions.

Signed-off-by: David Bauer <mail@david-bauer.net>
3 years agotests: Update sae_pmk_lifetime to match implementation
Jouni Malinen [Mon, 18 Oct 2021 18:21:07 +0000 (21:21 +0300)] 
tests: Update sae_pmk_lifetime to match implementation

The current PMKSA cache entry with SAE does not expire during the
association anymore.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoSAE: Do not expire the current PMKSA cache entry
Jouni Malinen [Mon, 18 Oct 2021 17:02:35 +0000 (20:02 +0300)] 
SAE: Do not expire the current PMKSA cache entry

There is no convenient mechanism for reauthenticating and generating a
new PMK during an association with SAE. As such, forced PMK update would
mean having to disassociate and reauthenticate which is not really
desired especially when the default PMKLifetime is only 12 hours.

Postpone PMKSA cache entry expiration of the currently used entry with
SAE until the association is lost. In addition, do not try to force the
EAPOL state machine to perform reauthentication for SAE since that won't
work.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agowpa_supplicant: Try all drivers by default
Kees Cook [Tue, 12 Oct 2021 18:28:31 +0000 (11:28 -0700)] 
wpa_supplicant: Try all drivers by default

Some distros carry patches to specify driver fallback, but only in
specific conditions (e.g. the systemd service definition[1]). This leaves
other wpa_supplicant instances needing to define fallback themselves,
which leads to places where wpa_supplicant thinks it can't find a
driver[2]. Instead, when -D is not specified, have wpa_supplicant try
all the drivers it was built with in an attempt to find a working one
instead of just giving up if the first doesn't work.

[1] https://salsa.debian.org/debian/wpa/-/blob/debian/unstable/debian/patches/networkd-driver-fallback.patch
[2] https://bugs.launchpad.net/netplan/+bug/1814012

Signed-off-by: Kees Cook <kees@ubuntu.com>
3 years agoAdd support to reconfigure or flush PMKSA cache on interface enable
Veerendranath Jakkam [Thu, 7 Oct 2021 14:16:04 +0000 (19:46 +0530)] 
Add support to reconfigure or flush PMKSA cache on interface enable

Update PMKSA cache when interface is disabled and then enabled based on
the new MAC address. If the new MAC address is same as the previous MAC
address, the PMKSA cache entries are valid and hence update the PMKSA
cache entries to the driver. If the new MAC address is not same as the
previous MAC address, the PMKSA cache entries will not be valid anymore
and hence delete the PMKSA cache entries.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
3 years agoPMKSA: Make sure reauth time is not greater than expiration time
Veerendranath Jakkam [Thu, 14 Oct 2021 13:26:14 +0000 (18:56 +0530)] 
PMKSA: Make sure reauth time is not greater than expiration time

While creating a cloned PMKSA entry for OKC both expiration and
reauth_time values are set to maximum values, but later only the
expiration time is copied from the old PMKSA entry to the new PMKSA
entry. Due to this there is a possibility of reauth_time becoming
greater than expiration time in some cloned entries. To avoid this copy
reauth_time also to the cloned entry.

Also, add check to reject control interface commands with reauth time
greater than expiration time.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
3 years agotests: AP configuration attempt using wps_config when WPS is disabled
Jouni Malinen [Thu, 14 Oct 2021 13:35:16 +0000 (16:35 +0300)] 
tests: AP configuration attempt using wps_config when WPS is disabled

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoFix hostapd segfault on WPS_CONFIG control interface command to non-WPS AP
Masashi Honma [Tue, 12 Oct 2021 22:40:04 +0000 (07:40 +0900)] 
Fix hostapd segfault on WPS_CONFIG control interface command to non-WPS AP

Execution of "hostapd_cli wps_config" to non-WPS AP causes segmentation
fault in hostapd.

$ hostapd_cli wps_config test WPA2PSK CCMP 12341234

wlp11s0: interface state UNINITIALIZED->COUNTRY_UPDATE
wlp11s0: interface state COUNTRY_UPDATE->ENABLED
wlp11s0: AP-ENABLED
WPA_TRACE: eloop SIGSEGV - START
[1]: ./git/hostap/hostapd/hostapd(+0x6c196) [0x55b270245196]
     eloop_sigsegv_handler() ../src/utils/eloop.c:123
[2]: /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f87574a7210]
[3]: ./git/hostap/hostapd/hostapd(hostapd_wps_config_ap+0x1a9) [0x55b2702ce349]
     hostapd_wps_config_ap() ../src/ap/wps_hostapd.c:1970
[4]: ./git/hostap/hostapd/hostapd(+0x90a9f) [0x55b270269a9f]
     hostapd_ctrl_iface_receive_process() ctrl_iface.c:3606
[5]: ./git/hostap/hostapd/hostapd(+0x94069) [0x55b27026d069]
     hostapd_ctrl_iface_receive() ctrl_iface.c:4093
[6]: ./git/hostap/hostapd/hostapd(+0x6c6d3) [0x55b2702456d3]
     eloop_sock_table_dispatch() ../src/utils/eloop.c:606
[7]: ./git/hostap/hostapd/hostapd(eloop_run+0x251) [0x55b2702461c1]
     eloop_sock_table_dispatch() ../src/utils/eloop.c:597
     eloop_run() ../src/utils/eloop.c:1229
[8]: ./git/hostap/hostapd/hostapd(main+0xd53) [0x55b270205773]
     hostapd_global_run() main.c:447
     main() main.c:892
[9]: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f87574880b3]
[10]: ./git/hostap/hostapd/hostapd(_start+0x2e) [0x55b2702058fe]
     _start() (null):0
WPA_TRACE: eloop SIGSEGV - END
Aborted

Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
3 years agowlantest: Fix PMK length and passphrase-based key derivation for FT
Jouni Malinen [Thu, 14 Oct 2021 13:28:02 +0000 (16:28 +0300)] 
wlantest: Fix PMK length and passphrase-based key derivation for FT

The change to support variable length PMK in wlantest missed couple of
places where the PMK length did not get used or set properly. In
particular, this ended up breaking FT key derivation for the case where
a passphrase was used to derive a potential per-BSS PMK. Fix this by
setting and using the PMK length properly.

Fixes: 6c29d95a9062 ("wlantest: Support variable length PMK")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoAdd TWT attribute to configure TWT related parameters
Gaurav Sharma [Fri, 8 Oct 2021 15:27:32 +0000 (20:57 +0530)] 
Add TWT attribute to configure TWT related parameters

Add QCA_WLAN_TWT_SET_PARAM TWT attribute to configure TWT related
parameters.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoReplace "dummy" with "stub" in crypto/random
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in crypto/random

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in NDIS driver interface
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in NDIS driver interface

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in EAP-TEAP testing
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in EAP-TEAP testing

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in VLAN testing ifname
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in VLAN testing ifname

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in WPS testing
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in WPS testing

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in wlantest injection
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in wlantest injection

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in preauth_test
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in preauth_test

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in comments/documentation
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in comments/documentation

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in wps_testing_dummy_cred
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in wps_testing_dummy_cred

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in Authenticator group keys
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in Authenticator group keys

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "dummy" with "stub" in SAE
Arowa Suliman [Sun, 19 Sep 2021 06:24:29 +0000 (23:24 -0700)] 
Replace "dummy" with "stub" in SAE

Replace the word "dummy" with the inclusive word "stub".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agohostap: Remove unused driver enum values with "master" in them
Arowa Suliman [Sun, 19 Sep 2021 06:24:28 +0000 (23:24 -0700)] 
hostap: Remove unused driver enum values with "master" in them

Get rid of some more used of the word "master".

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoReplace "sanity" with "validity"
Arowa Suliman [Sun, 19 Sep 2021 06:24:27 +0000 (23:24 -0700)] 
Replace "sanity" with "validity"

Replaced the word "sanity" with the inclusive word "validity". The
comment in acs_survey_interference_factor() was referring a function
that does not exist, so remove it instead of trying rename the function.

Signed-off-by: Arowa Suliman <arowa@chromium.org>
3 years agoP2P: Enforce SAE-H2E for P2P GO in 6 GHz
Sreeramya Soratkal [Thu, 12 Aug 2021 10:38:48 +0000 (16:08 +0530)] 
P2P: Enforce SAE-H2E for P2P GO in 6 GHz

Allow sae_pwe parameter to be configured per-network and enforce the
SAE hash-to-element mechanism for the P2P GO if it is started on
a 6 GHz channel.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
3 years agowpa_cli: Add support for SCS, MSCS, and DSCP commands
Veerendranath Jakkam [Tue, 28 Sep 2021 22:10:30 +0000 (03:40 +0530)] 
wpa_cli: Add support for SCS, MSCS, and DSCP commands

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
3 years agoHE: Disable HE in hostapd_set_freq_params() if driver does not support
Hu Wang [Thu, 30 Sep 2021 06:37:24 +0000 (12:07 +0530)] 
HE: Disable HE in hostapd_set_freq_params() if driver does not support

Existing logic to disable HE in hostapd_set_freq_params() is to check
he_cap != NULL, but this is not correct as he_cap is defined as a stack
member of hostapd_hw_modes which can't be NULL. Add one more check
!he_cap->he_supported to make sure HE can be disabled if the driver not
support it.

This fixes a case where a driver does not support HE, but hostapd.conf
enables HE/HT40 on the 2.4 GHz band and hostapd failed to start with
error '40 MHz channel width is not supported in 2.4 GHz'.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoAdd QCA vendor attributes to indicate 320 MHz spectral scan capabilities
Shiva Krishna Pittala [Thu, 7 Oct 2021 10:24:48 +0000 (15:54 +0530)] 
Add QCA vendor attributes to indicate 320 MHz spectral scan capabilities

Add a QCA vendor attribute to indicate agile spectral scan support for
320 MHz mode. Add another attribute to indicate the number of detectors
used for spectral scan in 320 MHz mode.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoUpdate ciphers to address GTK renewal failures while roaming
Vinay Gannevaram [Thu, 30 Sep 2021 07:18:26 +0000 (12:48 +0530)] 
Update ciphers to address GTK renewal failures while roaming

After roaming from WPA2-AP (group=CCMP) to WPA-AP (group=TKIP) using
driver-based SME and roaming trigger, GTK renewal failures are observed
for the currently associated WPA-AP because of group cipher mismatch,
resulting in deauthentication with the AP.

Update the group cipher and pairwise cipher values in wpa_sm from
association event received from the driver in case of SME offload to the
driver to address GTK renewal failures (and similar issues) that could
happen when the driver/firmware roams between APs with different
security profiles.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agotests: WPA2/WPA-PSK cfg80211 connect command to trigger roam
Jouni Malinen [Wed, 6 Oct 2021 17:55:58 +0000 (20:55 +0300)] 
tests: WPA2/WPA-PSK cfg80211 connect command to trigger roam

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoVendor command to configure/trigger the roam events
Sunil Dutt [Tue, 28 Sep 2021 08:29:21 +0000 (13:59 +0530)] 
Vendor command to configure/trigger the roam events

Introduce a new vendor command QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS
that aims to configure/trigger the roam events from the driver.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoAdd TWT vendor attribute to configure announce timeout value
Gaurav Sharma [Thu, 30 Sep 2021 11:08:01 +0000 (16:38 +0530)] 
Add TWT vendor attribute to configure announce timeout value

Add QCA_WLAN_VENDOR_ATTR_TWT_SETUP_ANNOUNCE_TIMEOUT attribute to
configure announce timeout value for announce TWT session.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoP2P: Make p2p_check_pref_chan_no_recv() easier for static analyzers
Jouni Malinen [Thu, 30 Sep 2021 15:27:37 +0000 (18:27 +0300)] 
P2P: Make p2p_check_pref_chan_no_recv() easier for static analyzers

Add an explicit check for msg->channel_list != NULL instead of depending
on msg->channel_list_len > 0 implying that. This is to silence invalid
static analyzer reports.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoMake get_mode() easier for static analyzers
Jouni Malinen [Thu, 30 Sep 2021 15:23:26 +0000 (18:23 +0300)] 
Make get_mode() easier for static analyzers

Add an explicit check for modes != NULL instead of depending on
num_modes > 0 implying that. This is to silence invalid static analyzer
reports.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agotests: wpa_supplicant AP mode and vendor elements
Jouni Malinen [Thu, 30 Sep 2021 15:20:49 +0000 (18:20 +0300)] 
tests: wpa_supplicant AP mode and vendor elements

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agoSupport vendor element configuration for AP mode from wpa_supplicant
Chaoli Zhou [Wed, 28 Jul 2021 10:51:08 +0000 (18:51 +0800)] 
Support vendor element configuration for AP mode from wpa_supplicant

Support adding/deleting vendor elements dynamically for AP mode while it
is started by wpa_supplicant instead of hostapd which already supported
this. This adds ap_assocresp_elements global parameter and UPDATE_BEACON
control interface command to take the changed values into effect.

Usage in wpa_cli:
Add vendor IE for (Re)Association Response frames
> set ap_assocresp_elements=xxxx
Add vendor IE for Beacon/Probe Response frames
> set ap_vendor_elements=xxxx

Delete vendor IE from (Re)Association Response frames
> set ap_assocresp_elements
Delete vendor IE from Beacon/Probe Response frames
> set ap_vendor_elements

To make vendor IE changes take effect
> update_beacon

Signed-off-by: Chaoli Zhou <zchaoli@codeaurora.org>
3 years agotests: Extend DSCP testing coverage
Jouni Malinen [Thu, 30 Sep 2021 13:55:01 +0000 (16:55 +0300)] 
tests: Extend DSCP testing coverage

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years agotests: DSCP policy
Shivani Baranwal [Sun, 12 Sep 2021 12:39:05 +0000 (18:09 +0530)] 
tests: DSCP policy

Signed-off-by: Shivani Baranwal <shivbara@codeaurora.org>