]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
8 months agoWi-Fi Generational Capabilities Indication reception on AP
Jouni Malinen [Tue, 5 Nov 2024 16:42:51 +0000 (18:42 +0200)] 
Wi-Fi Generational Capabilities Indication reception on AP

Process the received generational capabilities indication on AP. This
covers the Generational Capabilities Indication attribute parsing in
both (Re)Association Request frames and W-Fi Capabilities frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agoDefinitions for Wi-Fi Alliance generational capabilities indication
Jouni Malinen [Tue, 5 Nov 2024 16:40:47 +0000 (18:40 +0200)] 
Definitions for Wi-Fi Alliance generational capabilities indication

Define the identifiers assigned for Wi-Fi Alliance Capabilities frame
and Generational Capabilities Indication attribute.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agoAP: Update the list of Action frame categories that are not robust
Jouni Malinen [Tue, 5 Nov 2024 16:48:20 +0000 (18:48 +0200)] 
AP: Update the list of Action frame categories that are not robust

Number of new Action frame categories have been identified as being not
robust, i.e., not using management frame protection. Update AP mode
implementation to cover those to allow reception unprotection Action
frames from those categories.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agotests: Remove registration for Vendor Specific Protected action frames
Jouni Malinen [Tue, 5 Nov 2024 17:01:34 +0000 (19:01 +0200)] 
tests: Remove registration for Vendor Specific Protected action frames

This additional registration is not needed anymore since hostapd
registers for these frames internally. In fact, this additional
registration is now failing.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agonl80211: Register to receive Vendor Specific Protected action frames
Jouni Malinen [Tue, 5 Nov 2024 16:39:07 +0000 (18:39 +0200)] 
nl80211: Register to receive Vendor Specific Protected action frames

This is needed to be able to process Vendor Specific Protection action
frames. In particular, this is needed for the Wi-Fi Alliance
Capabilities frame on an AP.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agoControl interface command to generate new random MAC address
Shivani Baranwal [Sun, 18 Aug 2024 10:54:23 +0000 (16:24 +0530)] 
Control interface command to generate new random MAC address

Add NEW_RANDOM_MAC_ADDRESS command to allow wpa_supplicant to be
requested to change the currently used MAC address to a random one. This
is applicable only when not connected (or trying to connect).

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
8 months agotests: NAN USD and more complex Follow-up message sequences
Jouni Malinen [Mon, 4 Nov 2024 20:57:12 +0000 (22:57 +0200)] 
tests: NAN USD and more complex Follow-up message sequences

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agoNAN: Do not expire USD services based on last TX/RX message
Jouni Malinen [Mon, 4 Nov 2024 21:03:19 +0000 (23:03 +0200)] 
NAN: Do not expire USD services based on last TX/RX message

This behavior is not described in the Wi-Fi Aware specification, so
remove it and instead, expect services to terminate USD explicitly when
no further Follow-up messages are needed.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agoNAN: Wait on the channel with publisher is in pauseState
Jouni Malinen [Mon, 4 Nov 2024 20:45:26 +0000 (22:45 +0200)] 
NAN: Wait on the channel with publisher is in pauseState

Remain waiting for additional Follow-up messages on a publisher that is
in pauseState for a service that requires further service discovery.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agoNAN: Limit pauseState to be within service lifetime
Jouni Malinen [Mon, 4 Nov 2024 20:44:27 +0000 (22:44 +0200)] 
NAN: Limit pauseState to be within service lifetime

If a publish service is configured with an explicit lifetime (ttl), do
not allow pauseState duration to exceed that.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agoNAN: Print a debug entry on TX wait time expiration
Jouni Malinen [Mon, 4 Nov 2024 20:43:44 +0000 (22:43 +0200)] 
NAN: Print a debug entry on TX wait time expiration

This can be helpful for understanding NAN DE behavior.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agoNAN: Make DE aware of maximum driver supported listen time
Jouni Malinen [Mon, 4 Nov 2024 20:42:44 +0000 (22:42 +0200)] 
NAN: Make DE aware of maximum driver supported listen time

This can be used to optimize listen operations to be as long as the
driver supports instead of having to use a small enough value to work
with all drivers.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agoNAN: Do not unpause publisher on fixed Follow-up message timeout
Jouni Malinen [Mon, 4 Nov 2024 20:05:29 +0000 (22:05 +0200)] 
NAN: Do not unpause publisher on fixed Follow-up message timeout

Do not unpause publisher if more than one second has passed from the
last Follow-up message TX or RX. There is no such behavior described in
the Wi-Fi Aware specification and it is possible for a service to need
more time to generate Follow-up messages. Leave it to the service itself
to force timeout, if desired, or terminate pauseState after the 60
second overall timeout.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
8 months agotests: Do not expect NAN USD services to terminate automatically
Jouni Malinen [Mon, 4 Nov 2024 21:01:58 +0000 (23:01 +0200)] 
tests: Do not expect NAN USD services to terminate automatically

If further service discovery is needed, the USD services will not be
expiring automatically based on the last exchanged message, so modify
the test cases to explicitly terminate USD instead of waiting for the
timeout.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoP2P2: Add wpa_supplicant configuration parameters for P2P2
Shivani Baranwal [Sat, 31 Aug 2024 07:55:27 +0000 (13:25 +0530)] 
P2P2: Add wpa_supplicant configuration parameters for P2P2

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agodbus: Increment introspection buffer size
Jouni Malinen [Thu, 26 Sep 2024 09:06:36 +0000 (12:06 +0300)] 
dbus: Increment introspection buffer size

This is needed to allow more wpa_supplicant configuration parameters to
be added.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoP2P2: Enable TWT and Channel Usage support by default
Shivani Baranwal [Sun, 22 Sep 2024 21:35:49 +0000 (03:05 +0530)] 
P2P2: Enable TWT and Channel Usage support by default

It is mandatory to support Channel Usage and TWT in P2P2. Enable
peer to peer TWT and Channel Usage support for P2P GO.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoChannel Usage, peer-to-peer TWT and TWT requester support
Shivani Baranwal [Thu, 29 Aug 2024 06:08:46 +0000 (11:38 +0530)] 
Channel Usage, peer-to-peer TWT and TWT requester support

Add config support for channel usage procedure and peer-to-peer TWT on
AP and TWT Requester support on STA. The actual functionality of these
operations is expected to be implemented within the drivers.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Configuration of channel switch request for testing purposes
Shivani Baranwal [Thu, 18 Jul 2024 14:55:24 +0000 (20:25 +0530)] 
P2P2: Configuration of channel switch request for testing purposes

P2P2 advertises support for channel switch request in the PCEA
attribute. Add support to configure it through control interface for
testing purposes.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoAvoid undefined behavior in RSNXE capability bit checker
Jouni Malinen [Fri, 1 Nov 2024 19:58:07 +0000 (21:58 +0200)] 
Avoid undefined behavior in RSNXE capability bit checker

Integer promotion converts u8 rsnxe[i] to an int which is not
sufficiently large to be able to handle the maximum shift left of 24
bits here. Type cast rsnxe[i] to u32 explicitly to get rid of the sign
bit and avoid this undefined behavior from the shift operation.

Credit to OSS-Fuzz: https://issues.oss-fuzz.com/issues/376786400
Fixes: d675d3b15b40 ("Add helper functions for parsing RSNXE capabilities")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agotests: Wi-Fi Direct R2 test cases
Shivani Baranwal [Fri, 30 Aug 2024 18:23:16 +0000 (23:53 +0530)] 
tests: Wi-Fi Direct R2 test cases

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Validate DIRA and configure PMK
Shivani Baranwal [Sun, 4 Aug 2024 22:41:30 +0000 (04:11 +0530)] 
P2P2: Validate DIRA and configure PMK

When DIRA is matched, configure PMK for pairing verification of a
previously paired peer.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Add device identity block to wpa_supplicant configuration
Shivani Baranwal [Sun, 4 Aug 2024 22:49:48 +0000 (04:19 +0530)] 
P2P2: Add device identity block to wpa_supplicant configuration

Add device identity block to store DIK, PMK, PMKID, and cipher version.
This persistent data is used during pairing verification of previously
paired peers. This commit defines the data structures and adds reading
and writing routines. The actual use of the information will be added in
following commits.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Update P2P Device Address when changing netdev address
Shivani Baranwal [Sun, 18 Aug 2024 10:54:23 +0000 (16:24 +0530)] 
P2P2: Update P2P Device Address when changing netdev address

P2P2 adds support for privacy and needs ability to update the P2P Device
Address. Update that whenever changing the interface address in
wpa_supplicant for other (non-P2P) MAC address randomization purposes.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P: Print dst/src/bssid in Action frame TX debug message
Jouni Malinen [Fri, 1 Nov 2024 14:16:58 +0000 (16:16 +0200)] 
P2P: Print dst/src/bssid in Action frame TX debug message

It's helpful to know all the addresses used for P2P Action frames in the
debug message.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agotests: Update sae_password_id_pwe_looping to match implementation
Jouni Malinen [Fri, 1 Nov 2024 10:24:34 +0000 (12:24 +0200)] 
tests: Update sae_password_id_pwe_looping to match implementation

Now that hostapd was changed to explicitly reject attempts of using SAE
password identifiers without H2E, this test case needs to be updated to
not expect connection.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoSAE: Do not allow password identifier to be used without H2E
Jouni Malinen [Fri, 1 Nov 2024 10:06:10 +0000 (12:06 +0200)] 
SAE: Do not allow password identifier to be used without H2E

When the concept of SAE password identifiers was introduced in IEEE
P802.11REVme/D1.0, there was no requirement to use H2E with them.
However, this was changed for the published IEEE Std 802.11-2020 to
require H2E to avoid certain cases where the password identifier could
not have been parsed robustly.

Commit e36a5894d0c0 ("SAE: Use H2E whenever Password Identifier is
used") started forcing H2E to be used when password identifiers were in
use with SAE. However, it did not enforce rejection of cases where H2E
was not enabled by a non-compliant implementation. Add that explicit
check during parsing of SAE commit messages.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoSAE: Send Commit message with unknown-password-id from Nothing state
Jouni Malinen [Fri, 1 Nov 2024 10:18:41 +0000 (12:18 +0200)] 
SAE: Send Commit message with unknown-password-id from Nothing state

The unknown-password-id case (i.e., BadId indicator in the SAE finite
state machine in the standard) is supposed to have different behavior
based on whether the current state is Nothing or Committed. The previous
hostapd implementation did not send a response Authentication frame in
either case, but the standard describes that behavior only for the
Committed state while the Nothing state is expected to report the
failure.

Update hostapd to send the Authentication frame with status code
indicating unknown password identifier when processing a Commit message
in the Nothing state.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoSAE: Do not use the wpa_passphrase if SAE password identifier was used
Jouni Malinen [Thu, 31 Oct 2024 21:59:45 +0000 (23:59 +0200)] 
SAE: Do not use the wpa_passphrase if SAE password identifier was used

Sharing of the WPA-PSK passphrase as the SAE password is only for the
case where no SAE password identifiers are used. Do not consider that on
an AP if a STA includes SAE password identifier in an SAE commit
message. This avoids confusing cases where SAE would be allowed to
continue with the AP and the STA using different password identifier
which is going to fail in the end.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoAdd new QCA vendor attributes for TWT statistics
Kashish Awasthi [Wed, 23 Oct 2024 19:25:48 +0000 (00:55 +0530)] 
Add new QCA vendor attributes for TWT statistics

Add the following vendor attributes to get TWT early service period
termination metrices in enum qca_wlan_vendor_attr_twt_stats.
- QCA_WLAN_VENDOR_ATTR_TWT_STATS_AVG_EOSP_DUR_US
- QCA_WLAN_VENDOR_ATTR_TWT_STATS_EOSP_COUNT

Signed-off-by: Kashish Awasthi <quic_kawasthi@quicinc.com>
9 months agoAdd new QCA vendor TWT status values
Kashish Awasthi [Tue, 29 Oct 2024 13:26:47 +0000 (18:56 +0530)] 
Add new QCA vendor TWT status values

Add the following new status values in enum qca_wlan_vendor_twt_status
to enhance TWT session and operation handling, to cover various
scenarios such as peer rejections, timeouts and local teardown requests.
- QCA_WLAN_VENDOR_TWT_STATUS_TWT_ALREADY_RESUMED
- QCA_WLAN_VENDOR_TWT_STATUS_PEER_REJECTED
- QCA_WLAN_VENDOR_TWT_STATUS_TIMEOUT

Signed-off-by: Kashish Awasthi <quic_kawasthi@quicinc.com>
9 months agoReserve QCA vendor sub command id 255
Jouni Malinen [Thu, 31 Oct 2024 20:55:25 +0000 (22:55 +0200)] 
Reserve QCA vendor sub command id 255

This is reserved for QCA use.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoAdd QCA vendor interface for additional TWT Setup command types
Shivani Baranwal [Thu, 24 Oct 2024 14:10:42 +0000 (19:40 +0530)] 
Add QCA vendor interface for additional TWT Setup command types

Add support to include TWT setup command type TWT Grouping, Accept TWT,
Alternate TWT, Dictate TWT, and Reject TWT. These commands are valid if
the TWT Request field is 0.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agodbus: Notify P2P2 bootstrapping request and completed events
Shivani Baranwal [Thu, 30 May 2024 19:53:51 +0000 (01:23 +0530)] 
dbus: Notify P2P2 bootstrapping request and completed events

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Configure PMK/PMKID to the driver on the GO
Shivani Baranwal [Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)] 
P2P2: Configure PMK/PMKID to the driver on the GO

In P2P2, the PMKSA is generated through the PASN frame exchange during
the pairing process. Once pairing and group negotiation are successful,
the P2P Client initiates a connection with the P2P GO using the PMKID
derived during the pairing process. In the case of AP SME offload to the
driver, the driver handles the Association Request and Response frames
and needs to be able to determine whether the provided PMKID is known.
Therefore, configure the PMKID to the driver on the P2P GO to allow
association with the P2P Client.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Enable PASN on a P2P GO
Jouni Malinen [Tue, 29 Oct 2024 22:08:21 +0000 (00:08 +0200)] 
P2P2: Enable PASN on a P2P GO

Allow the AP SME in user space case to process PASN Authentication
frames for P2P GO.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoControl interface command to flush NAN publish and subscribe sessions
Shivani Baranwal [Wed, 30 Oct 2024 13:26:14 +0000 (18:56 +0530)] 
Control interface command to flush NAN publish and subscribe sessions

Add a control interface command for NAN_FLUSH to terminate all the
publish and subscribe sessions. This was previously done as a part of
the complete FLUSH operation, but it can be useful to be able to do this
specifically for NAN services without impacting other areas.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Fix pairing verification without encrypted elements
Shivani Baranwal [Thu, 17 Oct 2024 09:41:53 +0000 (15:11 +0530)] 
P2P2: Fix pairing verification without encrypted elements

During the pairing verification process, the KEK might not be derived,
and the PASN encrypted elements are absent in the P2P2 IE. Therefore, it
is necessary to permit other attributes such as PCEA and the Action
Frame Wrapper attribute in the Authentication frame for the invitation
process.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Determine PASN KEK derivation based on peer capabilities
Shivani Baranwal [Fri, 9 Aug 2024 07:40:11 +0000 (13:10 +0530)] 
P2P2: Determine PASN KEK derivation based on peer capabilities

P2P pairing setup requires KEK derivation during PTK generation in PASN,
as the Encrypted PASN element is needed to share the Device Identity Key
or opportunistic SAE password for association. However, during the
pairing verification process, the P2P peer might not indicate support
for KEK derivation in its capabilities since strictly speaking KEK is
not needed in that case even when the STAs are capable for deriving it.
Therefore, based on the peer's capabilities, avoid generating KEK while
deriving PTK.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoPASN: Mark PMK and PMKID const in functions adding PMKSA entries
Jouni Malinen [Tue, 29 Oct 2024 11:07:30 +0000 (13:07 +0200)] 
PASN: Mark PMK and PMKID const in functions adding PMKSA entries

This allows callers of these functions to mark PMK/PMKID const to keep
things more consistent.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoP2P2: Remember password from connect command to starting after scan
Shivani Baranwal [Wed, 3 Jul 2024 16:41:26 +0000 (22:11 +0530)] 
P2P2: Remember password from connect command to starting after scan

The password for pairing setup needs to be kept in memory so that it can
be used once a scan for the GO has completed.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Start client for join without WPS
Shivani Baranwal [Wed, 3 Jul 2024 16:41:26 +0000 (22:11 +0530)] 
P2P2: Start client for join without WPS

Do not use WPS enrollee for P2P2 connection.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Support for GO to allow a client to join the group
Shivani Baranwal [Wed, 3 Jul 2024 16:41:26 +0000 (22:11 +0530)] 
P2P2: Support for GO to allow a client to join the group

Enable P2P GO to authorize a client device to join the group. In the
case of opportunistic bootstrapping, P2P GO must share the password with
the client device during PASN authentication in an Encrypted Data
element. P2P GO retrieves the ssid->sae_password and stores it in
p2p->dev_sae_password and authorizes the client. The SAE password and
the random passphrase derived for WPA-PSK connection are same. This
allows use of the get_passphrase API to connect a P2P-R1 and P2P-R2
client in PCC mode which will be covered in separate commits.

The P2P Client initiates PASN authentication with the GO using either
the password or opportunistic bootstrapping method. In the password
method, the client initiates PASN authentication with SAE tunneling
using the password and proceeds with the connection using open
authentication. In the opportunistic bootstrapping method, the client
obtains the SAE password from the GO and initiates the connection with
SAE authentication.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Provisioning step on GO when a client joins
Shivani Baranwal [Wed, 3 Jul 2024 16:41:26 +0000 (22:11 +0530)] 
P2P2: Provisioning step on GO when a client joins

Add the PMKSA on the P2P2 GO when a new P2P2 Client joins the group
instead of going through the WPS step. This commit is adding just the
mechanism to add the PMKSA and the actual use for this is in a separate
commit.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Fix a typo in function documentation
Jouni Malinen [Tue, 29 Oct 2024 22:08:21 +0000 (00:08 +0200)] 
P2P2: Fix a typo in function documentation

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoP2P2: Fix peer entry generation based on USD
Jouni Malinen [Tue, 29 Oct 2024 10:27:12 +0000 (12:27 +0200)] 
P2P2: Fix peer entry generation based on USD

All cases calling dev_found() for a P2P peer will need to set the peer
flags to indicate it has been reported. In particular, this is needed to
avoid memory leaks in D-Bus code and in P2P peer cleanup. The recently
added P2P2 case using USD did not update the flags, so fix it to match
other cases.

Fixes: b4f9742ee246 ("P2P2: Process Element container attribute from NAN SDFs")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoRemove STA entries if association is not completed in 60 seconds
Jouni Malinen [Wed, 30 Oct 2024 10:04:01 +0000 (12:04 +0200)] 
Remove STA entries if association is not completed in 60 seconds

While the IEEE 802.11 standard allows STAs to authenticate with multiple
APs and later associate with one such AP, it is not really good for an
AP to maintain STA entries for not fully associated STA for significant
amount of time. Time out such STA entries in hostapd to clean state and
resources.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoSAE: More robust password identifier checks for AP mode
Jouni Malinen [Wed, 30 Oct 2024 10:30:35 +0000 (12:30 +0200)] 
SAE: More robust password identifier checks for AP mode

Do not update the more persistent sae->tmp->pw_id value based on each
received SAE commit message before having successfully processed the
commit. In particular, this includes checking for a matcing password
identifier in cases where the AP has enabled one or more SAE passwords
with identifiers.

A per-received message sae->tmp->parsed_pw_id is used during parsing and
processing of each individual message and sae->tmp->pw_id is set only
after having successfully processed a commit message. This avoids
getting sae->tmp->pw_id being bound to an unknown value.

An earlier commit addressed some of the sequences that could have this
issue, but it missed some cases. This newer more robust version covers
what the earlier commit did, so that part can be removed with the new
design.

Fixes: 761041b18ab2 ("SAE: Free password identifier if SAE commit is rejected due to it")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoSAE: Reject unexpected password identifier in commit message parser
Jouni Malinen [Wed, 30 Oct 2024 09:33:44 +0000 (11:33 +0200)] 
SAE: Reject unexpected password identifier in commit message parser

While the list of possible SAE password identifiers might not be
available at the time of parsing a SAE commit message, an AP knows
whether any password identifiers have been enabled (since it has to
advertise that in the Beacon frames). When parsing a commit message on
an AP with no password identifiers in use, the parser can already reject
the unexpected case of an SAE password identifier.

Check for this specific case and reject the SAE commit based on unknown
password identifier if the received value cannot be for an enabled
password. This prevents some cases where an active attacker might have
been able to cause DoS by binding an STA entry in hostapd to a specific
SAE password identifier even when that identifier is not in use.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agotests: Enable SAE Pw Id on AP in sae_proto_hostapd_valid_commit_after_fail
Jouni Malinen [Thu, 31 Oct 2024 09:11:46 +0000 (11:11 +0200)] 
tests: Enable SAE Pw Id on AP in sae_proto_hostapd_valid_commit_after_fail

This is in preparation to implementation changes that use knowledge of
whether SAE Password Identifiers have been enabled to reject unexpected
commit messages.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoSAE: Avoid duplicated debug entries for IEs in SAE commit messages
Jouni Malinen [Wed, 30 Oct 2024 09:05:50 +0000 (11:05 +0200)] 
SAE: Avoid duplicated debug entries for IEs in SAE commit messages

Print the "SAE: Possible elements at the end of the frame" debug message
only once (and only if there is actually some additional data) instead
of printing it for each element separately. There was some use for the
separated prints earlier, but that is not really helpful anymore with
the reduced mixing of IEs and non-IE fields at the end of the SAE commit
messages.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agohostapd: Fix clearing up settings for color switch
Stone Zhang [Mon, 14 Oct 2024 10:47:32 +0000 (18:47 +0800)] 
hostapd: Fix clearing up settings for color switch

Settings for color switch (struct cca_settings settings)
is used without zero clearing, which causes the member
settings->ubpr->unsol_bcast_probe_resp_intervalettings
to be a random value. It is againsts the NLA policy of
NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT and causes
BSS color switch failure.

Fixes: 654d2395dddf ("BSS coloring: Handling of collision events and triggering CCA")
Signed-off-by: Stone Zhang <quic_stonez@quicinc.com>
9 months agoP2P2: Do not add WPS IE to join-a-group scan
Shivani Baranwal [Wed, 3 Jul 2024 16:41:26 +0000 (22:11 +0530)] 
P2P2: Do not add WPS IE to join-a-group scan

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Use PASN for joining a group
Shivani Baranwal [Wed, 3 Jul 2024 16:41:26 +0000 (22:11 +0530)] 
P2P2: Use PASN for joining a group

When joining a P2P2 group, use PASN negotiation instead of the older
design.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Allow group to be added for P2P2 as autonomous GO
Shivani Baranwal [Wed, 3 Jul 2024 16:41:26 +0000 (22:11 +0530)] 
P2P2: Allow group to be added for P2P2 as autonomous GO

Add a "p2p2" parameter for P2P_GROUP_ADD to allow a group to be added
specifically for P2P2.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Add PMKSA entry on successful group formation
Shivani Baranwal [Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)] 
P2P2: Add PMKSA entry on successful group formation

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Fix to check if sae_password is present
Shivani Baranwal [Tue, 15 Oct 2024 06:13:14 +0000 (11:43 +0530)] 
P2P2: Fix to check if sae_password is present

Fix the check for whether sae_password is present. Instead of checking
the static array's address which is always going to be true, verify that
the string is not empty.

Fixes: cf30af7c2f23 ("P2P2: Start P2P Client appropriately for P2P2 group")
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agotests: Use pasn_data_deinit() in pasn-resp fuzzing tester
Jouni Malinen [Wed, 23 Oct 2024 20:49:45 +0000 (23:49 +0300)] 
tests: Use pasn_data_deinit() in pasn-resp fuzzing tester

The fuzzing tester for PASN responder needs to use pasn_data_deinit() to
free allocated memory in struct pasn_data after recent changes of adding
more allocated items into the struct. Without this, fuzz testing will
cause false positives due to memory leaks.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoP2P2: Invitation using pairing verification
Shivani Baranwal [Mon, 1 Jul 2024 19:11:48 +0000 (00:41 +0530)] 
P2P2: Invitation using pairing verification

Add support for P2P2 pairing verification using invitation.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Do not override peer_addr from BSSID in pairing verification
Shivani Baranwal [Mon, 1 Jul 2024 19:11:48 +0000 (00:41 +0530)] 
P2P2: Do not override peer_addr from BSSID in pairing verification

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Indicate P2P2 group in GO parameters
Shivani Baranwal [Mon, 1 Jul 2024 19:11:48 +0000 (00:41 +0530)] 
P2P2: Indicate P2P2 group in GO parameters

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Set up PMKSA for pairing verification
Shivani Baranwal [Mon, 1 Jul 2024 19:11:48 +0000 (00:41 +0530)] 
P2P2: Set up PMKSA for pairing verification

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Export p2p_build_inviation_req()
Shivani Baranwal [Mon, 1 Jul 2024 19:11:48 +0000 (00:41 +0530)] 
P2P2: Export p2p_build_inviation_req()

This will be needed for P2P2 invitation/pairing verification outside the
p2p_invitation.c file.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Do not add WSC IE for P2P2 Invitation Request
Shivani Baranwal [Mon, 1 Jul 2024 19:11:48 +0000 (00:41 +0530)] 
P2P2: Do not add WSC IE for P2P2 Invitation Request

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Fetch PMK and PMKID for invitation using pairing verification
Shivani Baranwal [Mon, 1 Jul 2024 19:11:48 +0000 (00:41 +0530)] 
P2P2: Fetch PMK and PMKID for invitation using pairing verification

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Stop invitation process before sending out Invitation Request
Shivani Baranwal [Mon, 1 Jul 2024 19:11:48 +0000 (00:41 +0530)] 
P2P2: Stop invitation process before sending out Invitation Request

This is needed for the P2P2 case of invitation using pairing validation.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Indication on whether P2P2 is used with P2P_INVITE
Shivani Baranwal [Mon, 1 Jul 2024 19:11:48 +0000 (00:41 +0530)] 
P2P2: Indication on whether P2P2 is used with P2P_INVITE

Add a new parameter "p2p2" to the P2P_INVITE control interface
command. This can be used to indicate that the operation is for a P2P2
group.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Parameter setting for testing purpose
Shivani Baranwal [Wed, 26 Jun 2024 21:24:59 +0000 (02:54 +0530)] 
P2P2: Parameter setting for testing purpose

Add support to configure following parameters using the P2P_SET command
for testing purposes:

    P2P_SET pasn_type <u8>
    - Bitmap of supported PASN types

    P2P_SET supported_bootstrapmethods <u16>
    - Supported P2P bootstrapping methods

    P2P_SET pairing_setup <0/1>
    - Enable/disable P2P pairing setup

    P2P_SET pairing_cache <0/1>
    - Enable/disable P2P pairing cache for verification

    P2P_SET pairing_verification <0/1>
    - Enable/disable P2P pairing verification with cached NIK/NPK

    P2P_SET comeback_after <u16>
    - Bootstrap request for unauthorized peer is asked to come back after
      this many TUs.

    P2P_SET reginfo <u8>
    - Regulatory info encoding for operation in 6 GHz band

    P2P_SET twt_power_mgmt <0/1>
    - Enable TWT based power management for P2P

As these parameters could be varying based on the test requirement these
should not be set in the wpa_supplicant configuration while testing.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Enable GCMP-256 as a pairwise cipher
Shivani Baranwal [Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)] 
P2P2: Enable GCMP-256 as a pairwise cipher

Add GCMP-256 as a pairwise cipher based on PASN type during pairing.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Clone P2P2 and bootstrapping state to group interfaces
Shivani Baranwal [Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)] 
P2P2: Clone P2P2 and bootstrapping state to group interfaces

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Start P2P Client appropriately for P2P2 group
Shivani Baranwal [Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)] 
P2P2: Start P2P Client appropriately for P2P2 group

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Add P2P2 IE for groups using P2P2
Shivani Baranwal [Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)] 
P2P2: Add P2P2 IE for groups using P2P2

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Start GO with suitable parameters for P2P2
Shivani Baranwal [Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)] 
P2P2: Start GO with suitable parameters for P2P2

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Indicate SAE password and PMK from pairing with GO negotiation
Shivani Baranwal [Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)] 
P2P2: Indicate SAE password and PMK from pairing with GO negotiation

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P: Clear GO negotiation results from stack after use
Jouni Malinen [Thu, 10 Oct 2024 20:45:07 +0000 (23:45 +0300)] 
P2P: Clear GO negotiation results from stack after use

struct p2p_go_neg_results contains private keys, so clear it from stack
explicitly to avoid leaving any unnecessary copies of keys in memory.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoP2P2: Select PMKSA based on P2P Device Address and PMKID match
Shivani Baranwal [Sun, 4 Aug 2024 22:12:08 +0000 (03:42 +0530)] 
P2P2: Select PMKSA based on P2P Device Address and PMKID match

Extend GO (AP) PMKSA selection to use P2P Device Address when searching
for a matching PMKSA.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Function callbacks for PASN
Shivani Baranwal [Sun, 4 Aug 2024 21:13:59 +0000 (02:43 +0530)] 
P2P2: Function callbacks for PASN

Add function callbacks for PASN through P2P to handle cases where direct
calls from PASN to P2P are not viable.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Add a SAE password in PASN Encrypted Data element
Shivani Baranwal [Sun, 4 Aug 2024 21:13:59 +0000 (02:43 +0530)] 
P2P2: Add a SAE password in PASN Encrypted Data element

This is added for opportunistic bootstrapping cases. In addition,
generate a random SAE password for pairing when needed, i.e., when the
request is not for an existing GO.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Parse and store peer's SAE password
Shivani Baranwal [Sun, 4 Aug 2024 21:13:59 +0000 (02:43 +0530)] 
P2P2: Parse and store peer's SAE password

Store the peer's password during group formation after opportunistic
PASN authentication or while joining an existing group.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agoP2P2: Parser function for PASN Encrypted Data element and DevIK
Shivani Baranwal [Sun, 4 Aug 2024 21:13:59 +0000 (02:43 +0530)] 
P2P2: Parser function for PASN Encrypted Data element and DevIK

Parse the encrypted P2P2 IE from PASN authentication frames and store a
copy of DevIK information so that this is available for use if the
connection succeeds for a persistent group.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
9 months agotests: Fix fuzzing tester build
Jouni Malinen [Sun, 13 Oct 2024 17:39:30 +0000 (20:39 +0300)] 
tests: Fix fuzzing tester build

The new pasn_common.c needs to included in PASN fuzzing testers.

Fixes: e15242565794 ("PASN: Routines for generating and processing encrypted data")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agotests: sigma_dut and all AKM suites for EAP
Jouni Malinen [Thu, 10 Oct 2024 14:44:01 +0000 (17:44 +0300)] 
tests: sigma_dut and all AKM suites for EAP

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agotests: FILS with RSNXE
Jouni Malinen [Thu, 10 Oct 2024 08:57:34 +0000 (11:57 +0300)] 
tests: FILS with RSNXE

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoFILS: Verify RSNXE when processing (Re)Association Response frame
Jouni Malinen [Thu, 10 Oct 2024 09:10:21 +0000 (12:10 +0300)] 
FILS: Verify RSNXE when processing (Re)Association Response frame

IEEE Std 802.11ai-2016 did not cover this since the RSNXE did not exist
at the time FILS was designed and IEEE Std 802.11-2020 did not seem to
catch this case either. However, the AP's RSNXE should be verified in
FILS in a similar manner to how the AP's RSNE is verified.

Add code to verify the RSNXE in FILS. However, since this has not been
clear in the standard and there has been hostapd releases that might
omit the RSNXE from (Re)Association Response frame when the STA does not
include the RSNXE in (Re)Association Request frame, do not reject
association based on this comparison result if the STA did not include
an RSNXE in the (Re)Association Request frame. This workaround might be
removed in the future.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoRSNO: Omit RSNXE in (Re)Association Response frame like in Beacon frame
Jouni Malinen [Thu, 10 Oct 2024 08:53:29 +0000 (11:53 +0300)] 
RSNO: Omit RSNXE in (Re)Association Response frame like in Beacon frame

When rsn_override_omit_rsnxe=1 is used to omit the RSNXE from Beacon and
Probe Response frames, it should also be omitted from (Re)Association
Response frames since there is a general expectation on the RSNXE being
used consistently between these frames. This is unlikely to have much of
a difference for most use cases in practice, but this could impact FILS
association if the non-AP STA were to confirm that the unprotected and
protected version of the RSNXE from the AP were identical.

Fixes: 8b2ddfdbb688 ("RSNO: Allow RSNXE to be omitted")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoFT: Omit RSNXE from Reassociation Response frame only with FT protocol
Jouni Malinen [Thu, 10 Oct 2024 08:29:01 +0000 (11:29 +0300)] 
FT: Omit RSNXE from Reassociation Response frame only with FT protocol

The special case for having to omit the RSNXE from Reassociation
Response frames applies only for FT protocol. This was incorrectly
applied to all cases where the (Re)Association Request frame did not
include an RSNXE. This should not have changed behavior for the FT initial
mobility domain association or any non-FT association.

Fix the conditions for omitting the RSNXE to apply only when actually
going through FT protocol. While this does not really have much, if any,
impact to most cases since non-AP STAs that do not include the RSNXE in
Association Request frame are unlikely to do anything with this element
(or its omission), this could have significant impact to FILS
authentication. The current IEEE 802.11 standard does not actually say
anything about validating the RSNXE in FILS (Re)Association Response
frame, but it should really be verified in the same manner as the RSNE
is (i.e., compared against the RSNXE in the Beacon frame) and that
should happen even if the non-AP STA does not include the RSNXE.

Fixes: b7366a942a58 ("FT: Omit RSNXE from FT protocol Reassociation Response when needed")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agotests: SAE PWE derivation with both options
Jouni Malinen [Thu, 10 Oct 2024 08:16:30 +0000 (11:16 +0300)] 
tests: SAE PWE derivation with both options

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoAP: Use helper functions in ap_sta_disconnect()
Jouni Malinen [Wed, 9 Oct 2024 17:05:32 +0000 (20:05 +0300)] 
AP: Use helper functions in ap_sta_disconnect()

There is a long history with ap_sta_disconnect() being added as the
handler for Disconnect operation from the RSN Authenticator state
machine and then evolving over years with
ap_sta_deauthenticate/disassociate() doing very similar operations, but
not exactly identical. This mess should really be cleaned up since many
of the differences are unlikely to be on purpose. As a step towards
that, use shared helper functions to make these functions avoid
duplicated implementation for the clearly common parts.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoAP: Clean up MLD changes that modified skipping DMG deauthentication
Jouni Malinen [Wed, 9 Oct 2024 16:46:23 +0000 (19:46 +0300)] 
AP: Clean up MLD changes that modified skipping DMG deauthentication

Commit 05e5e615e6a2 ("AP: Skip authentication/deauthentication phase for
DMG/IEEE 802.11ad") added the check for DMG in the beginnign of
ap_sta_deauthenticate() to convert that call to ap_sta_disassociate()
since deauthentication is not used in DMG. Commit c6f519ff15b2 ("AP:
Support deauthenticate/disassociate with MLD") ended up moving this DMG
check into the ap_sta_handle_deauthenticate() function that gets called
once for each link. This is confusing even though DMG is not really used
in MLD.

Move the DMG check back to the beginning of ap_sta_deauthenticate() to
make this clearer.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
9 months agoAvoid memcmp() with NULL pointer even if for zero length
Sunil Ravi [Fri, 20 Sep 2024 19:24:55 +0000 (19:24 +0000)] 
Avoid memcmp() with NULL pointer even if for zero length

Explicitly check for last_ssid->ssid to be set in wpa_bss_flush_by_age()
before using memcmp() to compare the SSID against the one in the BSS
entry. This is not really expected to do any real comparison here since
the case where last_ssid->ssid is NULL implies bss->ssid_len to be 0.
Anyway, avoid the unexpected memcmp(ptr, NULL, 0) call in such a case to
avoid issues with C libraries that might prevent such as unexpected
behavior.

Signed-off-by: Sunil Ravi <sunilravi@google.com>
9 months agotests: Mesh EHT 320 test case
Aditya Kumar Singh [Tue, 27 Aug 2024 05:27:49 +0000 (10:57 +0530)] 
tests: Mesh EHT 320 test case

Add a simple mesh test case for EHT 6 GHz/320 MHz operation.

And now since 9 is a possible value for max_oper_chwidth, modify test
case wpas_config_range_check as well.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
9 months agowpa_supplicant: 320 MHz bandwidth support for mesh
Aditya Kumar Singh [Tue, 27 Aug 2024 05:27:48 +0000 (10:57 +0530)] 
wpa_supplicant: 320 MHz bandwidth support for mesh

Mesh supported a maximum operational channel width of up to 160 or 80+80
MHz. Extend this to support a maximum operational channel width of up to
320 MHz.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
9 months agoAP MLD: Allow link ID to be specified for Action frame TX operations
Balamurugan Ramar [Wed, 28 Aug 2024 11:26:36 +0000 (16:56 +0530)] 
AP MLD: Allow link ID to be specified for Action frame TX operations

The Action frame sent by hostapd currently lacks a link ID, causing the
driver to independently determine the link ID based on available data.
This can sometimes result in the driver selecting an unintended link for
the Action frame transmission. To address this, add support to allow
hostapd to send the link ID along with Action frames to the driver.

This commit introduces only the function arguments to allow the link ID
to be provided.  A subsequent commit will fill the link ID based on the
required conditions.

Signed-off-by: Balamurugan Ramar <quic_bramar@quicinc.com>
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
9 months agonl80211: Handle radar event properly during MLO
Aditya Kumar Singh [Fri, 6 Sep 2024 13:23:57 +0000 (18:53 +0530)] 
nl80211: Handle radar event properly during MLO

Currently, the driver while sending an NL80211_CMD_RADAR_DETECT command
does not send a link ID at all. Hence the condition on whether the link
ID is passed is not required. At the same time, for certain commands,
if_idx will not be given and hence the event will be routed to the drv's
first BSS only which might not have any 5 GHz link. Hence there is need
to refactor the logic for such cases and identify the intended BSS
properly and then pass the event to it.

Hence,
  * identify the link ID based on the freq info present in the event.
  * identify the correct BSS to which the event should be routed in case
    the event comes without any if_idx.
  * check for the underlying link even when the link is not operating on
    the same frequency for events like NL80211_RADAR_NOP_FINISHED.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
9 months agonl80211: Send link ID when starting CAC for radar detection
Aditya Kumar Singh [Fri, 6 Sep 2024 13:23:56 +0000 (18:53 +0530)] 
nl80211: Send link ID when starting CAC for radar detection

For MLO, link ID needs to be sent along with the nl80211 command to
start CAC for radar detection. Pass the link ID if operating as an AP
MLD.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
10 months agowlantest: Avoid compiler warnings on printing out u64 in 32-bit builds
Jouni Malinen [Wed, 2 Oct 2024 21:52:19 +0000 (00:52 +0300)] 
wlantest: Avoid compiler warnings on printing out u64 in 32-bit builds

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
10 months agohostapd: Fix clearing old BSS during config reload
Ajith C [Wed, 21 Aug 2024 04:09:01 +0000 (09:39 +0530)] 
hostapd: Fix clearing old BSS during config reload

After a configuration reload, stations that were previously associated
with the AP could have failed to reconnect under the new configuration.

This issue arises because the new configuration is assigned to the
interface’s configuration pointer too early. The old configuration needs
to remain in the pointer until all existing stations are cleared.

Resolve this issue by assigning the new configuration only after all
existing stations have been cleared.

Fixes: b37c3fbad4a4 ("hostapd: Add config_id parameter")
Signed-off-by: Ajith C <quic_ajithc@quicinc.com>
10 months agoRemove unused arguments in ieee802_11_parse_link_assoc_req()
Adil Saeed Musthafa [Thu, 19 Sep 2024 17:16:02 +0000 (10:16 -0700)] 
Remove unused arguments in ieee802_11_parse_link_assoc_req()

The unparsed buffer of all IEs was not actually used at all in
ieee802_11_parse_link_assoc_req().

Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
10 months agoscan: Pass correct link ID in all cases
Aditya Kumar Singh [Sat, 7 Sep 2024 04:08:00 +0000 (09:38 +0530)] 
scan: Pass correct link ID in all cases

In hostapd, when a scan was initiated, the link ID parameter was not
populated in all scenarios, such as ACS. Additionally, each caller of
hostapd_driver_scan() provided the link ID. However, since
hostapd_driver_scan() has access to the hapd pointer, it can populate
the link ID itself.

And from wpa_supplicant, link ID was passed as 0 which does not seem to
be correct. Fix that as well.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
10 months agoAdd a QCA vendor event to indicate status of the idle shutdown
Ashish Kumar Dhanotiya [Tue, 24 Sep 2024 10:25:17 +0000 (15:55 +0530)] 
Add a QCA vendor event to indicate status of the idle shutdown

If there are no active Wi-Fi interfaces for a certain duration, the host
driver triggers idle shutdown. Add a new vendor event
QCA_NL80211_VENDOR_SUBCMD_IDLE_SHUTDOWN to indicate user space when the
idle shutdown is started or completed.

This uses attributes defined in enum qca_wlan_vendor_attr_idle_shutdown.

Signed-off-by: Ashish Kumar Dhanotiya <quic_adhanoti@quicinc.com>