]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
4 years agoAdd PTKSA cache to hostapd
Ilan Peer [Wed, 16 Dec 2020 11:00:31 +0000 (13:00 +0200)] 
Add PTKSA cache to hostapd

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoAP: Add support for configuring PASN
Ilan Peer [Wed, 16 Dec 2020 11:00:30 +0000 (13:00 +0200)] 
AP: Add support for configuring PASN

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoctrl_iface: Add support for PASN authentication
Ilan Peer [Wed, 16 Dec 2020 11:00:29 +0000 (13:00 +0200)] 
ctrl_iface: Add support for PASN authentication

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Add support for PASN processing to wpa_supplicant
Ilan Peer [Wed, 16 Dec 2020 11:00:28 +0000 (13:00 +0200)] 
PASN: Add support for PASN processing to wpa_supplicant

Add PASN implementation to wpa_supplicant

1. Add functions to initialize and clear PASN data.
2. Add functions to construct PASN Authentication frames.
3. Add function to process PASN Authentication frame.
4. Add function to handle PASN frame TX status.
5. Implement the station side flow processing for PASN.

The implementation is missing support for wrapped data and PMKSA
establishment for base AKMs, and only supports PASN authentication or
base AKM with PMKSA caching.

The missing parts will be added in later patches.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoWPA: Add PTKSA cache to wpa_supplicant for PASN
Ilan Peer [Wed, 16 Dec 2020 11:00:27 +0000 (13:00 +0200)] 
WPA: Add PTKSA cache to wpa_supplicant for PASN

PASN requires to store the PTK derived during PASN authentication
so it can later be used for secure LTF etc. This is also true
for a PTK derived during regular connection.

Add an instance of a PTKSA cache for each wpa_supplicant
interface when PASN is enabled in build configuration.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoWPA: Add PTKSA cache implementation
Ilan Peer [Wed, 16 Dec 2020 11:00:26 +0000 (13:00 +0200)] 
WPA: Add PTKSA cache implementation

In order to be able to perform secure LTF measurements, both the
initiator and the responder need to first derive TK and KDK and store
them, so they would later be available for the secure LTF negotiation.

Add a basic implementation of a PTKSA cache that stores derived TK/KDK
which can later be used for secure LTF negotiation, and add it to the
build configuration.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoWPA: Add a function to get PMKSA cache entry
Ilan Peer [Wed, 16 Dec 2020 11:00:25 +0000 (13:00 +0200)] 
WPA: Add a function to get PMKSA cache entry

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agocommon: Add PASN parsing to ieee802_11_parse_extension()
Ilan Peer [Wed, 16 Dec 2020 11:00:24 +0000 (13:00 +0200)] 
common: Add PASN parsing to ieee802_11_parse_extension()

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agotests: Add module tests for PASN PTK derivation
Ilan Peer [Wed, 16 Dec 2020 11:00:23 +0000 (13:00 +0200)] 
tests: Add module tests for PASN PTK derivation

Based on tests vectors taken from IEEE P802.11az/D2.6.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Add common Authentication frame build/validation functions
Ilan Peer [Wed, 16 Dec 2020 11:00:22 +0000 (13:00 +0200)] 
PASN: Add common Authentication frame build/validation functions

Add helper functions to construct a PASN Authentication frame and
validate its content, which are common to both wpa_supplicant and
hostapd.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Add functions to compute PTK, MIC and hash
Ilan Peer [Wed, 16 Dec 2020 11:00:21 +0000 (13:00 +0200)] 
PASN: Add functions to compute PTK, MIC and hash

1. Add a function to derive the PTK from a PMK and additional data.
2. Add a function to calculate the MIC for a PASN frames.
3. Add a function to compute the hash of an authentication frame body.

The above are built only in case that CONFIG_PASN is enabled at build
time.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoFILS: Extend the fils_pmk_to_ptk() function to also derive KDK
Ilan Peer [Wed, 16 Dec 2020 11:00:19 +0000 (13:00 +0200)] 
FILS: Extend the fils_pmk_to_ptk() function to also derive KDK

Extend the fils_pmk_to_ptk() to also derive Key Derivation
Key (KDK) which can later be used for secure LTF measurements.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoFT: Extend the wpa_pmk_r1_to_ptk() function to also derive KDK
Ilan Peer [Wed, 16 Dec 2020 11:00:18 +0000 (13:00 +0200)] 
FT: Extend the wpa_pmk_r1_to_ptk() function to also derive KDK

Extend the wpa_pmk_r1_to_ptk() to also derive Key Derivation
Key (KDK), which can later be used for secure LTF measurements.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoWPA: Extend the wpa_pmk_to_ptk() function to also derive KDK
Ilan Peer [Wed, 16 Dec 2020 11:00:17 +0000 (13:00 +0200)] 
WPA: Extend the wpa_pmk_to_ptk() function to also derive KDK

Extend the wpa_pmk_to_ptk() to also derive Key Derivation
Key (KDK), which can later be used for secure LTF measurements.

Update the wpa_supplicant and hostapd configuration and the
corresponding WPA and WPA Auth state machine, to allow enabling of KDK
derivation. For now, use a testing parameter to control whether KDK is
derived.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agocommon: Allow WPA_CIPHER_GTK_NOT_USED as a valid group management cipher
Ilan Peer [Wed, 16 Dec 2020 11:00:16 +0000 (13:00 +0200)] 
common: Allow WPA_CIPHER_GTK_NOT_USED as a valid group management cipher

PASN authentication requires that group management cipher suite
would be set to 00-0F-AC:7 in the RSNE, so consider it as a valid
group management cipher and adjust the code accordingly.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agonl80211: Always register for RX authentication frames with PASN
Ilan Peer [Wed, 16 Dec 2020 11:00:15 +0000 (13:00 +0200)] 
nl80211: Always register for RX authentication frames with PASN

Register a filter that only requests PASN Authentication frames
to be passed to user space.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agonl80211: Allow off-channel of PASN authentication frames in send_mlme()
Ilan Peer [Wed, 16 Dec 2020 11:00:14 +0000 (13:00 +0200)] 
nl80211: Allow off-channel of PASN authentication frames in send_mlme()

As part of the support needed for PASN.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agowlantest: Include PASN into build
Ilan Peer [Wed, 16 Dec 2020 11:00:20 +0000 (13:00 +0200)] 
wlantest: Include PASN into build

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoPASN: Add some specification definitions
Ilan Peer [Wed, 16 Dec 2020 11:00:20 +0000 (13:00 +0200)] 
PASN: Add some specification definitions

Based on IEEE P802.11az/D2.6.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
4 years agoAdd support for new 5 GHz channels 173 and 177
Sreeramya Soratkal [Mon, 23 Nov 2020 08:00:02 +0000 (13:30 +0530)] 
Add support for new 5 GHz channels 173 and 177

Add support for new channels 173 and 177 in the operating classes 125 to
130 as defined in draft IEEE P802.11ax/D8.0.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
4 years agoP2P: Fix channel selection for operating class 129
Sreeramya Soratkal [Mon, 23 Nov 2020 07:51:53 +0000 (13:21 +0530)] 
P2P: Fix channel selection for operating class 129

The operating class 129 includes channels with a maximum bandwidth of
160 MHz with center frequency index 50 and 114. The previous definition
of operating class 129 considered the center frequency index as actual
channels resulting in incorrect channel setup for the operating class.

Fix the definition of operating class 129 to consider channels with the
center frequency index of 50 and 114.

Also update the comment that describes the channel selection for
operating 128, 129, and 130 which mentions wpas_p2p_allow_channel()
verifies the channels while wpas_p2p_verify_channel() takes care of it.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
4 years agotests: DPP Responder behavior on missing Auth Confirm
Jouni Malinen [Fri, 22 Jan 2021 15:08:48 +0000 (17:08 +0200)] 
tests: DPP Responder behavior on missing Auth Confirm

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP: Abort authentication if no Auth Confirm is received within a second
Purushottam Kushwaha [Fri, 8 Jan 2021 09:38:25 +0000 (15:08 +0530)] 
DPP: Abort authentication if no Auth Confirm is received within a second

After sending DPP Auth Response, the Responder might not receive the
Auth Confirm either due to the Initiator not sending it or the reception
of the frame failing for some reason (e.g., Responder having already
left the negotiation channel). If this happens, following initiation
attempts would fail since the consecutive Auth Request would get
discarded since the previous authentication is still in progress.

Terminate DPP authentication on Responder, if no Auth Confirm is
received within one second of successfully sending Auth Response. This
allows the Responder to accept start of a new exchange.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAdd a configuration to disconnect on deinit if WoWLAN is enabled
Sunil Dutt [Tue, 19 Jan 2021 13:00:32 +0000 (18:30 +0530)] 
Add a configuration to disconnect on deinit if WoWLAN is enabled

Commit 02c21c02d09f ("wpa_supplicant: Do not disconnect on deinit if
WoWLAN is enabled") prevents the disconnection on deinit if the driver
indicates that WoWLAN is enabled. This is not the expected behavior in
some earlier use cases where the wpa_supplicant process is left running
when going to sleep and killing of the wpa_supplicant process is used
only when there is an expectation of Wi-Fi connection being disabled.

To support the use cases which require the WLAN to disconnect on deinit
even if WoWLAN is enabled, introduce a configuration parameter
wowlan_disconnect_on_deinit. This is set to 0 by default thereby not
impacting the functionality in the above mentioned commit. Setting it to
1 restores the old behavior before the commit identified above.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix rfkill testing with updated kernel
Jouni Malinen [Fri, 15 Jan 2021 16:10:34 +0000 (18:10 +0200)] 
tests: Fix rfkill testing with updated kernel

Kernel commit 14486c82612a ("rfkill: add a reason to the HW rfkill
state") added an extra byte to the end of the rfkill events and that
confused the read loop here since python tried to buffer the results
from multiple read() calls into the local buffer that then delivered the
extra octets in consecutive events. Fix this by disabling buffering for
these reads.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agodbus: Export new 'suiteb192' capability
Antonio Cardace [Wed, 16 Dec 2020 16:55:40 +0000 (17:55 +0100)] 
dbus: Export new 'suiteb192' capability

Export a new 'suiteb192' capability to indicate that wpa_supplicant was
built with WPA-EAP-SUITE-B-192 support and accepts
'key_mgmt=WPA-EAP-SUITE-B-192'.

Signed-off-by: Antonio Cardace <acardace@redhat.com>
4 years agoDBus: Add 'owe' to interface Capabilities
Brian Norris [Mon, 21 Dec 2020 18:40:31 +0000 (10:40 -0800)] 
DBus: Add 'owe' to interface Capabilities

Signed-off-by: Brian Norris <briannorris@chromium.org>
4 years agotests: Fix ap_ft_eap_pull_wildcard_multi_bss
Andrei Otcheretianski [Wed, 23 Dec 2020 10:17:10 +0000 (12:17 +0200)] 
tests: Fix ap_ft_eap_pull_wildcard_multi_bss

Python enumerates dictionaries in an arbitrary order, thus the resulting
configuration file will have the parameters shuffled randomly. This may
cause the test to fail when, for example, auth_server_addr is placed
after auth_server_port. Fix this by enforcing some of the fields to be
placed before the others.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agowpa_cli: Add WPS_EVENT_OVERLAP to action scripts
Berkay Ercan [Wed, 23 Dec 2020 14:58:44 +0000 (17:58 +0300)] 
wpa_cli: Add WPS_EVENT_OVERLAP to action scripts

WPS_EVENT_OVERLAP case was missing on wpa_cli_action_process function in
wpa_cli.c, so when the overlap event occurs, there was no event message
sent to the action script. Add this event case to the function.

Signed-off-by: Berkay Ercan <berkay.ercan@airties.com>
Signed-off-by: Veli Demirel <veli.demirel@airties.com>
4 years agotests: remote: Allow shuffle
Janusz Dziedzic [Sun, 10 Jan 2021 15:50:48 +0000 (16:50 +0100)] 
tests: remote: Allow shuffle

With -S option we will run tests in random order.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agotests: remotehost: Add missed select import
Janusz Dziedzic [Sun, 10 Jan 2021 15:50:47 +0000 (16:50 +0100)] 
tests: remotehost: Add missed select import

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agotests: remotehost: Remove wait_execute_complete
Janusz Dziedzic [Sun, 10 Jan 2021 15:50:46 +0000 (16:50 +0100)] 
tests: remotehost: Remove wait_execute_complete

Today we have thread_wait().

Fixes: 11b3af3dad12 ("tests: remotehost: Use correct name")
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agonl80211: Add missing WPA3-SAE auth_data in auth retry case
hongwang.li [Tue, 12 Jan 2021 02:12:58 +0000 (18:12 -0800)] 
nl80211: Add missing WPA3-SAE auth_data in auth retry case

When wpa_supplicant sends NL80211_CMD_AUTHENTICATE to kernel, it is
possible that the cfg80211 in kernel has expired the BSS entry that
we are trying to auth with. Then cfg80211 will reject the auth cmd.
In this case, wpa_supplicant will trigger a single channel scan to
refresh cfg80211 BSS entry, and retry the auth when scan is finished.

When this case happens, wpa_supplicant makes a copy of auth params,
such as frequency, bssid, ssid, ie and so on. So when we retry auth,
the copy of these params will be used. The problem is, a param named
auth_data is missed when making the copy. The auth_data is used by
NL80211_ATTR_SAE_DATA which is a mandatory field for WPA3-SAE auth.
In WPA3-SAE case the auth retry will always fail because auth_data is
missing. This patch fixes the issue.

Signed-off-by: hongwang.li <hongwang.li@sonos.com>
4 years agoFT: Update key mgmt properly in RSNE during roaming
Shiva Sankar Gajula [Wed, 13 Jan 2021 10:44:03 +0000 (16:14 +0530)] 
FT: Update key mgmt properly in RSNE during roaming

When STA is performing roam from WPA3 AP to WPA2 AP, the STA was
including key mgmt FT-SAE instead of FT-PSK in FT Authentication request
RSNE when using driver-based SME. This is because the RSNE/MDE/FTE were
updated and forwarded to the driver using the NL80211_CMD_UPDATE_FT_IES
command before updating key mgmt properly. Because of this, the AP is
rejecting FT Authentication request with WLAN_REASON_UNSPECIFIED reason
code which is due to the invalid keymgmt in RSNE.

Fix this by reordering IE population to happen earlier in the sequence
so that the updated key mgmt information can be provided when using
NL80211_CMD_UPDATE_FT_IES.

Signed-off-by: Shiva Sankar Gajula <sgajula@codeaurora.org>
4 years agotests: FT reassociation SAE-PSK-SAE
Jouni Malinen [Fri, 15 Jan 2021 10:00:57 +0000 (12:00 +0200)] 
tests: FT reassociation SAE-PSK-SAE

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAdd user configured vendor IEs to default scan IEs
Vinita S. Maloo [Thu, 3 Dec 2020 14:34:20 +0000 (20:04 +0530)] 
Add user configured vendor IEs to default scan IEs

Add user configured vendor IEs for Probe Request frames to default scan
IEs so that these IEs will be included in the Probe Request frames for
the scans issued also by components other than wpa_supplicant.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix p2p fuzzer build after API change
Jouni Malinen [Wed, 23 Dec 2020 12:09:52 +0000 (14:09 +0200)] 
tests: Fix p2p fuzzer build after API change

Commit 7b121af26af5 ("P2P: Delay P2P scan when an external scan is in
progress") added a new argument to p2p_scan_res_handled(), but did not
update this test tool. Fix this by using hardcoded value 0 for the new
delay argument.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAndroid: Pass the vendor events to $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)
Sunil Dutt [Fri, 11 Dec 2020 14:33:48 +0000 (06:33 -0800)] 
Android: Pass the vendor events to $(BOARD_WPA_SUPPLICANT_PRIVATE_LIB)

Android has a mechanism to extend the driver interface in vendor
specific ways. This implementation of the vendor interface is done in
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB). Extend this to allow the vendor
events to be provided to this library to facilitate the event
processing.

Introduce a new board configuration via
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB_EVENT) rather than reusing
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB) to enable this event handling in the
private library. This is to avoid compilation issues for
wpa_driver_nl80211_driver_event() with the already existing private
library implementations defined with
$(BOARD_WPA_SUPPLICANT_PRIVATE_LIB).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoP2P: Delay P2P scan when an external scan is in progress
Purushottam Kushwaha [Tue, 8 Dec 2020 10:53:56 +0000 (16:23 +0530)] 
P2P: Delay P2P scan when an external scan is in progress

When an external scan is in progress on the same radio, delay the P2P
search operation based on configuration parameter p2p_search_delay. The
"search_delay" configuration done through p2p_find always takes
precedence over this delay value set due to an external scan trigger.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoP2P: Recover p2p_find operation in case of failure to fetch scan results
Sunil Dutt [Tue, 8 Dec 2020 06:18:13 +0000 (11:48 +0530)] 
P2P: Recover p2p_find operation in case of failure to fetch scan results

Add a handler to notify failures to fetch the scan results and provide
an option to override default behavior of requesting a new scan in one
second in such an error condition. Use this new handler mechanism to
continue the p2p_find operation (by invoking p2p_scan_res_handled) for
an interim scenario where the p2p_scan attempt fails to get the scan
results from the driver which can happen, e.g., if there are parallel
updates to the cfg80211 scan results.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoProcess QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH after NL80211_CMD_ROAM
Purushottam Kushwaha [Fri, 27 Nov 2020 10:23:33 +0000 (15:53 +0530)] 
Process QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH after NL80211_CMD_ROAM

NL80211_CMD_ROAM indication is scheduled via a kernel work queue, while
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH is a vendor event from the
driver. Thus, a race condition can exist wherein the vendor event is
received prior to the NL80211_CMD_ROAM indication.

The processing of this vendor event depends on the NL80211_CMD_ROAM
indication to update the roamed BSS/BSSID information and thus the out
of sequence processing of these events would result in not updating the
right BSS information.

This commit adds a workaround to hold the pending
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event for up to 100 ms in
case NL80211_CMD_ROAM is not received first.

Signed-off-by: Purushottam Kushwaha <pkushwah@codeaurora.org>
4 years agonl80211: Do not ignore disconnection event after a connection event
Vamsi Krishna [Fri, 18 Dec 2020 17:20:00 +0000 (22:50 +0530)] 
nl80211: Do not ignore disconnection event after a connection event

After a disconnect command is issued, wpa_supplicant generates a
disconnection event to self and ignores the next disconnection event
coming from the driver.  In a race condition in which the driver
generates a connected event due to roaming just before receiving the
disconnect command from userspace, wpa_supplicant processes the
connected event after processing the self-generated disconnection event
and enters WPA_COMPLETED state. The driver sends a disconnection event
after processing the disconnect command sent by wpa_supplicant but the
disconnection event is ignored by wpa_supplicant as the disconnection
event is considered to be a result of locally generated disconnect
command. Thus, wpa_supplicant continues to be in the connected
(WPA_COMPLETED) state though the driver is in disconnected state.

Fix this out-of-sync behavior between the driver and wpa_supplicant by
not ignoring the disconnection event from the driver because of the
locally generated disconnect command sent to the driver if there is a
connection event received after issuing the disconnect command to the
driver.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Update ap_open_unexpected_assoc_event to match implementation
Jouni Malinen [Mon, 21 Dec 2020 13:50:33 +0000 (15:50 +0200)] 
tests: Update ap_open_unexpected_assoc_event to match implementation

Now that wpa_supplicant ignores the unexpected association event in
disconnected-not-trying-to-connect state, this test cases needs to be
modified to avoid incorrect failures.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDrop unexpected connection event while disconnected
Vamsi Krishna [Thu, 3 Dec 2020 16:45:29 +0000 (22:15 +0530)] 
Drop unexpected connection event while disconnected

If there is a disconnect command from wpa_supplicant immediately after
the driver sends a connection event to userspace but before that event
is received and processed by wpa_supplicant, wpa_supplicant processes
the disconnect command and a self-generated disconnected event first
followed by the connected event received from the driver. As a result
wpa_supplicant moves to the WPA_COMPLETED state.  Whereas the driver
processes the disconnect command received from wpa_supplicant after it
sends the connected event and moves to the disconnected state. Due to
this race between the disconnect command from wpa_supplicant and the
connected event from the driver, wpa_supplicant is moving to the
connected state though the driver is moving to the disconnected state
which results in abnormal functionality.

Ignore the connection event coming from the driver when wpa_supplicant
is not trying to connect after a disconnect command is issued but before
the next connect command is issued to fix the above mentioned race
condition.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoVendor feature capability to notify TWT asynchronous response support
Sunil Dutt [Fri, 18 Dec 2020 04:36:19 +0000 (10:06 +0530)] 
Vendor feature capability to notify TWT asynchronous response support

The response for the respective TWT operations can either be synchronous
or asynchronous (wherever specified). If synchronous, the response to
this operation is obtained in the corresponding vendor command reply to
the user space. For asynchronous case, the response is obtained as an
event with the same operation type.

Drivers shall support either of these modes but not both simultaneously.
The support for asynchronous mode is advertised through the new flag
QCA_WLAN_VENDOR_FEATURE_TWT_ASYNC_SUPPORT. If the driver does not
include this flag, it shall support synchronous mode.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoNew TWT operations and attributes to TWT Setup and Nudge
Sunil Dutt [Tue, 24 Nov 2020 18:11:11 +0000 (23:41 +0530)] 
New TWT operations and attributes to TWT Setup and Nudge

Define the following additional TWT operations:
QCA_WLAN_TWT_GET_STATS, QCA_WLAN_TWT_CLEAR_STATS,
QCA_WLAN_TWT_GET_CAPABILITIES, QCA_WLAN_TWT_SETUP_READY_NOTIFY.

Also define new attributes to qca_wlan_vendor_attr_twt_setup
and qca_wlan_vendor_attr_twt_nudge.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDPP2: Add DPP_CONTROLLER commands to hostapd_cli and wpa_cli
Disha Das [Thu, 10 Dec 2020 06:05:32 +0000 (11:35 +0530)] 
DPP2: Add DPP_CONTROLLER commands to hostapd_cli and wpa_cli

Add the DPP control interface DPP_CONTROLLER_START and
DPP_CONTROLLER_STOP commands to the CLIs.

Signed-off-by: Disha Das <dishad@codeaurora.org>
4 years agoUse bool for is_6ghz variables and functions
Jouni Malinen [Fri, 11 Dec 2020 15:18:09 +0000 (17:18 +0200)] 
Use bool for is_6ghz variables and functions

Replace the implicit boolean checks that used int variables with use of
a more explicit bool variable type.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: setband with band combination
Jouni Malinen [Fri, 11 Dec 2020 15:10:30 +0000 (17:10 +0200)] 
tests: setband with band combination

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoExtend the setband support for 6 GHz and band combinations
Veerendranath Jakkam [Thu, 6 Aug 2020 06:34:48 +0000 (12:04 +0530)] 
Extend the setband support for 6 GHz and band combinations

Support possible band combinations of 2.4 GHz, 5 GHz, and 6 GHz with
QCA_WLAN_VENDOR_ATTR_SETBAND_MASK attribute. Ensure backwards
compatibility with old drivers that are using
QCA_WLAN_VENDOR_ATTR_SETBAND_VALUE attribute and supporting only 2.4 GHz
and 5 GHz bands.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
4 years agotests: Update scan_fail to match implementation change
Jouni Malinen [Fri, 11 Dec 2020 17:54:47 +0000 (19:54 +0200)] 
tests: Update scan_fail to match implementation change

The function name for adding frequency lists changed, so this test case
needs a matching change to avoid failures.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoscan: Add a helper function to append supported freqs from a given band
Veerendranath Jakkam [Fri, 20 Nov 2020 14:28:50 +0000 (19:58 +0530)] 
scan: Add a helper function to append supported freqs from a given band

This functionality was repeated for couple of times. Use a shared helper
function to avoid code duplication.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
4 years agoFix gcc-10 build with -Werror=array-bounds and dl_list_for_each()
Jouni Malinen [Fri, 4 Dec 2020 11:45:03 +0000 (13:45 +0200)] 
Fix gcc-10 build with -Werror=array-bounds and dl_list_for_each()

The earlier workaround for UBSAN issues in commit 3b6b3ae58133 ("Modify
dl_list_for_each() to not use unaligned access with WPA_TRACE") ended up
using a construction in which the type cast to the containing structure
was compared instead of the struct dl_list pointers. While that worked
around the UBSAN issue, it resulted in a comparison that gcc-10
interprets as being out of bounds for struct dl_list (which it obviously
is since this is to find the start of the containing structure).

Revert that workaround and instead, mark the struct dl_list used within
struct os_alloc_trace to have matching 16 octet alignment as the
containing structure. This is also restoring consistent design for
dl_list_for_each*().

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: HE: Add a test for wifi generation on 2.4 GHz
Johannes Berg [Tue, 13 Oct 2020 12:04:01 +0000 (14:04 +0200)] 
tests: HE: Add a test for wifi generation on 2.4 GHz

This was broken in the kernel in mac80211 for a while, until commit
780a8c9efc65 ("mac80211: do not disable HE if HT is missing on 2.4 GHz")
fixed it.

Add a test for wifi generation on 2.4 GHz in addition to the 5 GHz one.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agowolfSSL: Client cert loading API fix
Juliusz Sosinowicz [Wed, 21 Oct 2020 15:59:53 +0000 (17:59 +0200)] 
wolfSSL: Client cert loading API fix

Client cert loading API should check equality to SSL_SUCCESS for
success.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
4 years agonl80211: Report invalid signal and noise when info is unavailable
Avraham Stern [Tue, 3 Nov 2020 07:54:16 +0000 (09:54 +0200)] 
nl80211: Report invalid signal and noise when info is unavailable

When the driver sends a CQM RSSI threshold event, wpa_supplicant queries
the driver for the signal and noise values. However, it is possible that
by that time the station has already disconnected from the AP, so these
values are no longer valid. In this case, indicate that these values are
invalid by setting them to WPA_INVALID_NOISE.

Previously a value of 0 would be reported, which may be confusing as
this is a valid value.

Since nl80211_get_link_signal() and nl80211_get_link_noise() already set
invalid values for a case of failure, just use the value set by these
functions even if they fail.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
4 years agotests: remotehost: Introduce wait_event()
Janusz Dziedzic [Sat, 7 Nov 2020 10:49:15 +0000 (11:49 +0100)] 
tests: remotehost: Introduce wait_event()

Allow to run local/remote process like:
 - ubus listen
 - logread -f
 - tail -f
 - wpa_cli
 - hostapd_cli
And next wait for specific event(s).

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agotests: remotehost: Use correct name
Janusz Dziedzic [Sat, 7 Nov 2020 10:49:14 +0000 (11:49 +0100)] 
tests: remotehost: Use correct name

While we start thread use:
 - thread_run
 - therad_stop
 - thread_wait

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
4 years agowlantest: Allow missing RSNE in S1G beacon
Thomas Pedersen [Thu, 22 Oct 2020 18:20:32 +0000 (11:20 -0700)] 
wlantest: Allow missing RSNE in S1G beacon

S1G beacons save a few bytes by not requiring the RSNE in beacon if RSN
BSS is configured. Handle this in wlantest by only clearing RSNE from
the BSS info if frame is a Probe Response frame.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
4 years agotests: Skip dpp_enterprise_tcp tests without OpenSSL
Andrei Otcheretianski [Thu, 22 Oct 2020 15:01:37 +0000 (18:01 +0300)] 
tests: Skip dpp_enterprise_tcp tests without OpenSSL

Skip these tests if OpenSSL wasn't loaded, instead of crashing.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
4 years agotests: Determine number of parallel make jobs automatically
Jouni Malinen [Fri, 4 Dec 2020 09:49:04 +0000 (11:49 +0200)] 
tests: Determine number of parallel make jobs automatically

Use nproc (if available) instead of the hardcoded 8 parallel make jobs.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Skip test cases properly if tshark is not available
Jouni Malinen [Fri, 4 Dec 2020 09:43:45 +0000 (11:43 +0200)] 
tests: Skip test cases properly if tshark is not available

Instead of trying to process empty results, mark the test case as
skipped if tshark is not available.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agotests: Fix p2p_autogo_pref_chan_not_in_regulatory
Thomas Pedersen [Thu, 27 Aug 2020 22:58:55 +0000 (15:58 -0700)] 
tests: Fix p2p_autogo_pref_chan_not_in_regulatory

Sweden now allows channel 149 in the updated wireless-regdb. Choose
Japan for the negative test instead.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
4 years agoAdd option to ignore Probe Request frames when RSSI is too low
John Crispin [Wed, 12 Aug 2020 16:55:31 +0000 (18:55 +0200)] 
Add option to ignore Probe Request frames when RSSI is too low

Add a new hostapd configuration parameters rssi_ignore_probe_request to
ignore Probe Request frames received with too low RSSI.

Signed-off-by: John Crispin <john@phrozen.org>
4 years agowpa_supplicant: Initial connection speedup
Frederik Juul [Thu, 23 Jul 2020 08:39:41 +0000 (08:39 +0000)] 
wpa_supplicant: Initial connection speedup

Add initial_freq_list to wpa_supplicant configuration. This option
allows wpa_supplicant to scan a smaller list of frequencies when it
starts. This in turn allows for a faster connection to an already known
network. This limit applies only for the initial scan operation and does
not restrict other channels from being used in consecutive scans.

Tests have shown this to reduce the amount of time for connecting to a
network from roughly 3 seconds to roughly 0.1 second.

Signed-off-by: Frederik Juul <frederik.juul@3shape.com>
4 years agotests: DFS and no available channel after radar detection
Jouni Malinen [Wed, 2 Dec 2020 14:47:28 +0000 (16:47 +0200)] 
tests: DFS and no available channel after radar detection

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoDFS: Enter DFS state if no available channel is found
David Bauer [Sat, 4 Jul 2020 08:12:21 +0000 (10:12 +0200)] 
DFS: Enter DFS state if no available channel is found

Previously hostapd would not stop transmitting when a DFS event was
detected and no available channel to switch to was available.

Disable and re-enable the interface to enter DFS state. This way, TX
does not happen until the kernel notifies hostapd about the NOP
expiring.

Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agohostapd: Add ability to disable HT/VHT/HE per BSS
Shay Bar [Tue, 30 Jun 2020 14:23:46 +0000 (17:23 +0300)] 
hostapd: Add ability to disable HT/VHT/HE per BSS

Add the ability to disable HT/VHT/HE for specific BSS from hostapd.conf.

- Add disable_11ax boolean to hostapd_bss_config.
- Change disable_11n and disable_11ac to bool in hostapd_bss_config.
- Add configuration option to set these disable_11* parameters
  (which were previously used only automatically based on incompatible
  security parameters to disable HT/VHT).

Signed-off-by: Shay Bar <shay.bar@celeno.com>
4 years agomesh: Move mesh frequency setting to its own function
Markus Theil [Tue, 30 Jun 2020 12:19:06 +0000 (14:19 +0200)] 
mesh: Move mesh frequency setting to its own function

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
4 years agotests: DFS test for mesh
Markus Theil [Tue, 30 Jun 2020 12:19:04 +0000 (14:19 +0200)] 
tests: DFS test for mesh

Add a test which uses a DFS channel, waits for CAC afterwards successful
mesh join and then triggers a radar event and checks if the mesh comes
up again on the same device.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
4 years agomesh: Fix DFS deinit/init
Markus Theil [Tue, 30 Jun 2020 12:19:03 +0000 (14:19 +0200)] 
mesh: Fix DFS deinit/init

The hostapd DFS code deinitializes and initializes the AP interface, if
a clean channel switch is not possible. In this case the AP code paths
would deinit the driver, for example nl80211, without wpa_supplicant
code paths getting notice of this.

Therefore add callbacks for wpa_supplicant mesh methods, which are
called on init/deinit of the AP BSS. These callbacks are then used to
handle the reset in the mesh code.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
4 years agomesh: Fix for mesh init/deinit
Markus Theil [Tue, 30 Jun 2020 12:19:02 +0000 (14:19 +0200)] 
mesh: Fix for mesh init/deinit

Send mesh group started notification after join completion
callback is called.

Implement outstanding TODO, to leave the mesh network on deinit.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
4 years agomesh: Fix mesh_oom test
Markus Theil [Tue, 30 Jun 2020 12:19:05 +0000 (14:19 +0200)] 
mesh: Fix mesh_oom test

Only change freq params, if ifmsh->freq is set initially, which only
happens if hostapd_get_hw_features in setup_interface2 succeeds.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
4 years agomesh: Inform kernel driver about DFS handler in userspace
Peter Oh [Tue, 30 Jun 2020 12:19:01 +0000 (14:19 +0200)] 
mesh: Inform kernel driver about DFS handler in userspace

The kernel requires indication of DFS handler residing in user space
(NL80211_ATTR_HANDLE_DFS) to enable DFS channels.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
4 years agomesh: Fix channel switch error during CAC
Peter Oh [Tue, 30 Jun 2020 12:19:00 +0000 (14:19 +0200)] 
mesh: Fix channel switch error during CAC

Mesh interface would have used its channel parameters that were
configured during initialization even after channel switch due to DFS
radar detection during CAC which could result in a channel switch error.
Fix the error by updating the channel parameters when channel has been
changed from the initial one.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
4 years agonl80211: Do not set offchanok on DFS channels in non-ETSI for mesh
Peter Oh [Tue, 30 Jun 2020 12:18:59 +0000 (14:18 +0200)] 
nl80211: Do not set offchanok on DFS channels in non-ETSI for mesh

mac80211 does not allow mgmt tx to use off channel on
DFS channels in non-ETSI domain, because it will invalidate
CAC result on current operating channel.
(mac80211 commit: 34373d12f3cbb74960a73431138ef619d857996f)
Hence don't set offchanok for mgmt tx in case of DFS channels
in non-ETSI.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
4 years agomesh: Update ssid->frequency as pri/sec channels switch
Peter Oh [Tue, 30 Jun 2020 12:18:57 +0000 (14:18 +0200)] 
mesh: Update ssid->frequency as pri/sec channels switch

ssid->frequency is one of the variables used to get the channel number
from a given frequency. Leaving it as unchanged when pri/sec channel
switch will cause picking up a wrong channel number after applying the
secondary channel offset for HT40 and leads to failing interface
bring-up.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
4 years agomesh: Use setup completion callback to complete mesh join
Peter Oh [Tue, 30 Jun 2020 12:18:56 +0000 (14:18 +0200)] 
mesh: Use setup completion callback to complete mesh join

Mesh join function is the last function to be called during mesh join
process, but it's been called a bit earlier than it's supposed to be, so
that some mesh parameter values such as VHT capabilities were not
applied correct when mesh join is in process. Moreover, the current
design of mesh join that is called directly after mesh initialization
isn't suitable for DFS channels to use, since mesh join process should
be paused until DFS CAC is done and resumed after it's done.

The callback will be called by hostapd_setup_interface_complete_sync().
There is a possibility that completing mesh init fails, so add error
handling codes for that.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
4 years agoQCA vendor attributes to configure TX and RX NSS
Sachin Ahuja [Mon, 23 Nov 2020 11:27:40 +0000 (16:57 +0530)] 
QCA vendor attributes to configure TX and RX NSS

Define QCA vendor attributes to dynamically configure TX NSS and RX NSS
to be used with QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_CONFIGURATION commands.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: WPA2-PSK and supplicant receiving unexpected EAPOL-Key frames
Jouni Malinen [Mon, 23 Nov 2020 19:28:19 +0000 (21:28 +0200)] 
tests: WPA2-PSK and supplicant receiving unexpected EAPOL-Key frames

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Use helper functions for PSK ext EAPOL-Key processing
Jouni Malinen [Mon, 23 Nov 2020 19:02:03 +0000 (21:02 +0200)] 
tests: Use helper functions for PSK ext EAPOL-Key processing

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAP: Check driver support while auto-selecting bandwidth for AP/P2P GO
Sreeramya Soratkal [Wed, 18 Nov 2020 10:51:29 +0000 (16:21 +0530)] 
AP: Check driver support while auto-selecting bandwidth for AP/P2P GO

If the maximum operating channel width for AP/P2P GO is not specified,
it is auto-selected during configuration. While selecting the channel
width, if VHT is supported and 160 MHz channels are available, 160 MHz
channel width is preferred to 80 MHz.

During the selection of the channel width, the corresponding driver
capabilities were not checked. As a result, the AP/P2P GO configuration
was set to use the available 160 MHz channels even if the driver did not
have capability to support the 160 MHz channel width causing failure to
start the AP/P2P GO.

Fix this by checking the driver support for the 160 MHz channel width
while selecting the channel width for AP/P2P GO.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
4 years agoAdd bus failure reason code to vendor indication
Arun Kumar Khandavalli [Fri, 20 Nov 2020 11:46:11 +0000 (17:16 +0530)] 
Add bus failure reason code to vendor indication

Add bus failure hang reason code in enum qca_wlan_vendor_hang_reason.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: ANQP protection indication
Jouni Malinen [Mon, 23 Nov 2020 18:35:00 +0000 (20:35 +0200)] 
tests: ANQP protection indication

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoIndicate whether additional ANQP elements were protected
Jouni Malinen [Mon, 23 Nov 2020 18:32:26 +0000 (20:32 +0200)] 
Indicate whether additional ANQP elements were protected

Store information on whether extra ANQP elements were received using the
protection alternative (protected GAS during an association using PMF)
and make this available through the control interface BSS command.

For example:
anqp[277]=<hexdump>
protected-anqp-info[277]=1

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAdd vendor attributes for TWT nudge request
Srinivas Girigowda [Wed, 28 Oct 2020 21:42:50 +0000 (14:42 -0700)] 
Add vendor attributes for TWT nudge request

TWT nudge is a combination of suspend and resume in a single request.
Add TWT nudge operation and QCA vendor attributes to support
the TWT nudge request.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoBSS: Use variable length array for IEs at the end of struct wpa_bss
Jouni Malinen [Mon, 16 Nov 2020 14:25:17 +0000 (16:25 +0200)] 
BSS: Use variable length array for IEs at the end of struct wpa_bss

Replace the previously used design "(u8 *) (bss + 1)" with a variable
length array at the end of struct wpa_bss bss->ies[] in hopes of making
this easier to understand for static analyzers.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoBSS: Use wrapper function for getting a pointer to the IE buffer
Jouni Malinen [Mon, 16 Nov 2020 14:21:56 +0000 (16:21 +0200)] 
BSS: Use wrapper function for getting a pointer to the IE buffer

This makes it easier to change the internal struct wpa_bss design for
storing the variable length IE buffers.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoBSS: Add wpa_bss_get_ie_ext() wrapper
Jouni Malinen [Mon, 16 Nov 2020 14:00:21 +0000 (16:00 +0200)] 
BSS: Add wpa_bss_get_ie_ext() wrapper

This removes need from the callers to know the struct wpa_bss details
for the location of the memory area for storing the IEs.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoMark wpa_bss_get_fils_cache_id() argument const
Jouni Malinen [Mon, 16 Nov 2020 13:52:22 +0000 (15:52 +0200)] 
Mark wpa_bss_get_fils_cache_id() argument const

This function does not modify the BSS entry.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agotests: Fix test description strings for couple of SAE cases
Jouni Malinen [Mon, 16 Nov 2020 13:36:59 +0000 (15:36 +0200)] 
tests: Fix test description strings for couple of SAE cases

Remove the extraneous closing parenthesis.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoChange list arguments to const where possible
Hai Shalom [Tue, 3 Nov 2020 02:14:11 +0000 (18:14 -0800)] 
Change list arguments to const where possible

Change struct dl_list pointer argument to const in list functions that
do not manipulate the list: dl_list_len() and dl_list_empty().

Signed-off-by: Hai Shalom <haishalom@google.com>
4 years agonl80211: Send the sae_pwe value to the driver
Rohan Dutta [Sat, 7 Nov 2020 13:53:24 +0000 (19:23 +0530)] 
nl80211: Send the sae_pwe value to the driver

Use NL80211_ATTR_SAE_PWE attribute to indicate the sae_pwe value
to the driver during the NL80211_CMD_START_AP and NL80211_CMD_CONNECT
in WPA3-Personal networks which are using SAE authentication.

Signed-off-by: Rohan Dutta <drohan@codeaurora.org>
4 years agoP2P: Disable P2P in the 6 GHz band for now
Vamsi Krishna [Mon, 16 Nov 2020 07:01:34 +0000 (12:31 +0530)] 
P2P: Disable P2P in the 6 GHz band for now

P2P usage in the 6 GHz band is not standardized yet by WFA. Disable P2P
operations in the 6 GHz band to avoid potential interop issues with
existing P2P devices in production. P2P operations in the 6 GHz band can
be reenabled later after defining standard ways to address potential
interop issues with existing P2P devices.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoP2P: Include p2p_6ghz_disable in global configuration
Sreeramya Soratkal [Thu, 29 Oct 2020 13:45:47 +0000 (19:15 +0530)] 
P2P: Include p2p_6ghz_disable in global configuration

Previously, the configuration to disable the 6 GHz band remained local
to the P2P interface. With this there is a possibility of 6 GHz channels
being included in the channel list when the channel list needs to be
updated if the state changes on one of the interfaces.

Include the configuration to disable the 6 GHz band for P2P as a global
configuration value to prevent the inclusion of 6 GHz channels in the
channel list for P2P when the channel list needs to be updated during
the state change in one of the interfaces.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
4 years agoAdd connect fail reason code from the driver to assoc reject event
Vinita S. Maloo [Thu, 15 Oct 2020 14:58:17 +0000 (20:28 +0530)] 
Add connect fail reason code from the driver to assoc reject event

Add support to report a vendor specific connect fail reason code fetched
from the driver to users by adding the reason code to the event
CTRL-EVENT-ASSOC-REJECT. Fetch the connect fail reason code when the
driver sends a failure connection result and append the reason code, if
available, to assoc reject event.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoVendor feature capability to support concurrent sessions on Wi-Fi bands
Sunil Dutt [Wed, 4 Nov 2020 16:09:38 +0000 (21:39 +0530)] 
Vendor feature capability to support concurrent sessions on Wi-Fi bands

Introduces a vendor specific feature capability
QCA_WLAN_VENDOR_FEATURE_CONCURRENT_BAND_SESSIONS to know if the device
supports concurrent network sessions on different Wi-Fi bands. This feature
capability is attributed to the hardware's capability to support the same
(e.g., DBS).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
4 years agoAdd extra parameters to vendor command GPIO attribute
Nandha Kishore Easwaran [Wed, 11 Nov 2020 13:08:02 +0000 (18:38 +0530)] 
Add extra parameters to vendor command GPIO attribute

Add extra parameters mux_config, drive, and init_enable
to the GPIO config command.

Signed-off-by: Nandha Kishore Easwaran <nandhaki@codeaurora.org>
4 years agoSync with mac80211-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Mon, 16 Nov 2020 11:14:27 +0000 (13:14 +0200)] 
Sync with mac80211-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2020-11-11.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years agoSet NLA_F_NESTED flag with NL80211_ATTR_VENDOR_DATA conditionally
Vinita S. Maloo [Tue, 27 Oct 2020 18:03:59 +0000 (23:33 +0530)] 
Set NLA_F_NESTED flag with NL80211_ATTR_VENDOR_DATA conditionally

The newer kernel versions enforce strict netlink attribute policy
validation and will cause cfg80211 to reject vendor commands with
NL80211_ATTR_VENDOR_DATA if NLA_F_NESTED attribute is not set but
if the vendor command is expecting nested data within
NL80211_ATTR_VENDOR_DATA attribute.

Most of the earlier instances were addressed by adding NLA_F_NESTED
flag in nla_nest_start(). This commit addresses the remaining
instance in which NL80211_ATTR_VENDOR_DATA is populated using data
set by user through the control interface.

Enhance the control interface VENDOR command to indicate whether the
vendor subcommand uses nested attributes within NL80211_ATTR_VENDOR_DATA
attribute or not.

Set NLA_F_NESTED flag for existing QCA vendor commands which use nested
attributes within the NL80211_ATTR_VENDOR_DATA attributes so that the
old frameworks implementations for already existing commands work
without any issues.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>