]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
22 months agoFILS: EHT additions
Aloka Dixit [Mon, 24 Jul 2023 23:16:26 +0000 (16:16 -0700)] 
FILS: EHT additions

Add support for EHT phy index and maximum NSS as per IEEE P802.11be/D4.0,
9.6.7.36 and 9.4.2.313.4.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
22 months agoFILS: Fix NSS calculation for HE mode
Aloka Dixit [Mon, 24 Jul 2023 23:16:25 +0000 (16:16 -0700)] 
FILS: Fix NSS calculation for HE mode

Maximum NSS calculation for HE mode checks if both Tx and Rx support
a given NSS. Modify it to instead check if either of these two support
the given NSS.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
22 months agoFILS: Rename local variable to indicate HE mode
Aloka Dixit [Mon, 24 Jul 2023 23:16:24 +0000 (16:16 -0700)] 
FILS: Rename local variable to indicate HE mode

Rename the local variable mcs_nss_size to he_mcs_nss_size in
hostapd_fils_discovery_cap() and hostapd_gen_fils_discovery_nss()
to limit its usage to HE mode.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
22 months agoFILS: Move maximum NSS determination to a new function
Aloka Dixit [Mon, 24 Jul 2023 23:16:23 +0000 (16:16 -0700)] 
FILS: Move maximum NSS determination to a new function

Create a separate function to set the maximum number of spatial streams
in FILS discovery frames.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
22 months agoFILS: Move phy index determination to new function
Aloka Dixit [Mon, 24 Jul 2023 23:16:22 +0000 (16:16 -0700)] 
FILS: Move phy index determination to new function

Move the phy index determination for FILS discovery frames to a new
function without changing the functionality. HE support is mandatory for
operating in the 6 GHz band hence the phy index will always be set to
FD_CAP_PHY_INDEX_HE for this band.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
22 months agoDPP: Use CONFIG_SAE consistently to avoid a compiler warning
Jouni Malinen [Fri, 29 Sep 2023 14:07:56 +0000 (17:07 +0300)] 
DPP: Use CONFIG_SAE consistently to avoid a compiler warning

The sae_password_entry is used in this function only if CONFIG_SAE is
defined, so declare this variable only under the same condition.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
22 months agoAP MLD: Add missing CONFIG_SAE checks
Aloka Dixit [Mon, 24 Jul 2023 20:33:01 +0000 (13:33 -0700)] 
AP MLD: Add missing CONFIG_SAE checks

Fix the compilation errors caused by missing checks for CONFIG_SAE.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
22 months agoUpdate Wide Bandwidth Channel Switch element
Yuvarani V [Wed, 27 Sep 2023 07:22:03 +0000 (12:52 +0530)] 
Update Wide Bandwidth Channel Switch element

Update Wide Bandwidth Channel Switch element as per IEEE
P802.11-REVme/D4.0, 9.4.2.159 (Wide Bandwidth Channel Switch element)
and Table 9-314 (VHT Operation Information subfields).

Update New Channel Width, New Channel Center Frequency Segment 0, and
New Channel Center Frequency Segment 1 fields as per IEEE
P802.11-REVme/D4.0 for 160 MHz and 80+80 MHz bandwidth. This replaces
the use of now deprecated Channel Width 2 and 3 values with a more
backwards compatible design.

Signed-off-by: Yuvarani V <quic_yuvarani@quicinc.com>
22 months agoSAE: Do not reject reauth threshold passed PMKSA in association event
Veerendranath Jakkam [Wed, 27 Sep 2023 04:55:34 +0000 (10:25 +0530)] 
SAE: Do not reject reauth threshold passed PMKSA in association event

Do not reject reauth threshold passed PMKSA indicated in successful
association event since the PMKSA is still valid.

Additionally, remove the reauth threshold passed PMKSA entry from the
driver to prevent using it further in the driver.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
22 months agoPASN: Copy PMK to PASN context on responder
Vinay Gannevaram [Tue, 26 Sep 2023 14:47:43 +0000 (20:17 +0530)] 
PASN: Copy PMK to PASN context on responder

Wi-Fi Aware pairing responder needs to forward the derive PMK to the
framework on successful pairing setup. The framework will set
corresponding PMK while a pairing verification is initiated by the
paired peer. Since the PMK is not updated for responder's PASN context,
framework does not have a valid PMK and verification fails. Hence copy
the derived PMK to PASN context.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
22 months agohostapd: Fix premature beacon set during association handling
Aditya Kumar Singh [Tue, 26 Sep 2023 07:42:39 +0000 (13:12 +0530)] 
hostapd: Fix premature beacon set during association handling

Currently, during association handling, if any of the iface parameters
changes due to some reason, it calls ieee802_11_set_beacons() function.
This function sets beacon for the all the BSSes in that iface even if
the beacon was not set already. This leads to setting the beacon
prematurely for some BSSes which was intentionally not started.

Fix the above issue by calling ieee802_11_update_beacons() function
instead. This function only updates the beacon if it was already set.

While at it, do the same while freeing STA entry.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
22 months agoAdd channel 144 (5720 MHz) into operating class conversion tables
Shuibing Dai [Tue, 19 Sep 2023 03:02:23 +0000 (20:02 -0700)] 
Add channel 144 (5720 MHz) into operating class conversion tables

Based on IEEE Std 802.11-2020 Table E-3 (Operating classes in Japan) and
Table E-4 (Global operating classes), we update channel 144 for those
corresponding operating classes.

The changes applicable to the global operating classes fixes an issue of
P2P GO not starting on channel 144 (frequency 5720 MHz) in cases where
the driver supports DFS operations.

Signed-off-by: Shuibing Dai <shuibing@google.com>
22 months agoRefine roam stats frame subtypes in a QCA vendor attribute
Chunquan Luo [Wed, 13 Sep 2023 12:17:34 +0000 (05:17 -0700)] 
Refine roam stats frame subtypes in a QCA vendor attribute

Enumeration qca_wlan_roam_stats_frame_subtype defines the various frame
subtypes which may be collected by the driver and reported via the
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_FRAME_SUBTYPE attribute.

Two of the enumerators are:
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_PREAUTH
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_REASSOC

These were initially defined and used to respectively report
Authentication Response and Reassociation Response frames.

Now there is a requirement to also report Authentication Request and
Reassociation Request frames. In order to satisfy this requirement,
add two new enumerators:
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_AUTH_REQ
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_REASSOC_REQ

Note that the first of these uses the standard term "AUTH" instead of
the confusing term "PREAUTH" used previously.

And to align with that naming, and in order to clearly show the usage
of the original enumerators, rename them to:
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_AUTH_RESP
* QCA_WLAN_ROAM_STATS_FRAME_SUBTYPE_REASSOC_RESP

Furthermore, Authentication Request/Response frame refers to the
Authentication frames sent by the non-AP STA and AP, respectively.

And finally, to support backward compatibility with applications using
the original enumerators, redefine those in terms of the new names.

Signed-off-by: Chunquan Luo <quic_chunquan@quicinc.com>
22 months agoUpdate roam stats of AP BSSID to user space in a QCA vendor attribute
Chunquan Luo [Fri, 22 Sep 2023 02:55:25 +0000 (19:55 -0700)] 
Update roam stats of AP BSSID to user space in a QCA vendor attribute

Fetch AP BSSID from each roam connection frame and cache the info in the
WLAN driver. When user space gets roam stats by
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_INFO, user space can now collect the AP
BSSID info for roam issue.

Signed-off-by: Chunquan Luo <quic_chunquan@quicinc.com>
22 months agoEAP-SIM/AKA peer: Simplify identity selection for MK derivation
Jouni Malinen [Thu, 21 Sep 2023 07:46:38 +0000 (10:46 +0300)] 
EAP-SIM/AKA peer: Simplify identity selection for MK derivation

Redesign the identity selection for MK derivation to be done explicitly
based on the last indicated identity (whether it is from
EAP-Response/Identity or method specific AT_IDENTITY) during the current
exchange. This makes the implementation cleaner and avoids cases were
more or less duplicated selection steps ended up being slightly
different. This is not as clean as it could otherwise be due to the
exception needed for the IMSI privacy case where the identity used in MK
derivation is actually not the one exchanged in the EAP messages.

Furthermore, this moves the somewhat confusing EAP method specific
tracking of the lasgt EAP-Response/Identity value from EAP-SIM/AKA into
the main EAP peer implementation.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
22 months agotests: Adding EAP-SIM/AKA coverage for ID selection
Jouni Malinen [Thu, 21 Sep 2023 07:56:42 +0000 (10:56 +0300)] 
tests: Adding EAP-SIM/AKA coverage for ID selection

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
22 months agoEAP-SIM/AKA server: Configurable limit to fast re-authentication
Jouni Malinen [Thu, 21 Sep 2023 08:02:38 +0000 (11:02 +0300)] 
EAP-SIM/AKA server: Configurable limit to fast re-authentication

Allow the EAP-SIM/AKA server to be configured to use a smaller limit for
the number of times fast re-authentication can be used before falling
back to running full authentication. This is particularly useful for EAP
peer testing to cover cases when falling back from fast
re-authentication to full authentication in various different cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
22 months agoEAP-SIM/AKA server: Allow method specific identity exchange to be skipped
Jouni Malinen [Thu, 21 Sep 2023 08:00:04 +0000 (11:00 +0300)] 
EAP-SIM/AKA server: Allow method specific identity exchange to be skipped

While the EAP-SIM/AKA RFCs recommend against doing this, some deployed
authentication servers use the identity from the EAP-Response/Identity
directly without using an EAP method specific indication (AT_IDENTITY).
Having a capability to configure hostapd EAP server to behave in this
manner helps in increasing testing coverage for the EAP peer
implementation.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
22 months agoEAP-SIM/AKA peer: Fix identity selection for MK derivation with AT_IDENTITY
Jouni Malinen [Thu, 21 Sep 2023 08:45:37 +0000 (11:45 +0300)] 
EAP-SIM/AKA peer: Fix identity selection for MK derivation with AT_IDENTITY

A case was missing in the way wpa_supplicant was tracking the identity
that is used when deriving MK if the EAP server does not follow the RFC
guidance on using EAP method specific identity determination (i.e.,
AT_IDENTITY for EAP-SIM/AKA) combined with a fallback from fast
re-authentication to full authentication. wpa_supplicant ended up using
the actual identity instead of the last identity included in an EAP
message even though MK derivation is supposed to use the identity that
was included in the last AT_IDENTITY or in the EAP-Response/Identity if
AT_IDENTITY was not used. This resulted in such an authentication
attempt failing due to incorrect MK being derived and AT_MAC validation
resulting in an mismatch.

Fix this by checking for the case where fast re-authentication is
attempted and the server recognizes the fast re-auth identity, but
decides to fall back to full authentication without a separate EAP
method specific identity exchange using AT_IDENTITY. This allows the
fast re-auth identity from EAP-Response/Identity to be used in MK
derivation in such cases.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
22 months agoDefine a QCA vendor attribute to set traffic shaping policy
Shailendra Singh [Wed, 13 Sep 2023 03:42:04 +0000 (09:12 +0530)] 
Define a QCA vendor attribute to set traffic shaping policy

Define a new QCA vendor attribute to configure traffic
shaping policy applied during coex scenarios.

Signed-off-by: Shailendra Singh <quic_shasing@quicinc.com>
22 months agoAdd _IS_ML flag attribute to the ADD_STA_NODE QCA vendor command
Adil Saeed Musthafa [Wed, 13 Sep 2023 22:56:03 +0000 (15:56 -0700)] 
Add _IS_ML flag attribute to the ADD_STA_NODE QCA vendor command

Add an attribute QCA_WLAN_VENDOR_ATTR_ADD_STA_NODE_IS_ML to the
ADD_STA_NODE command. If this attribute is set, it implies that the node
being added is an MLD node.

Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
22 months agoExtend maximum allowed bandwidth update type QCA vendor interface
Veerendranath Jakkam [Wed, 6 Sep 2023 20:45:26 +0000 (02:15 +0530)] 
Extend maximum allowed bandwidth update type QCA vendor interface

Extend QCA_WLAN_VENDOR_ATTR_CONFIG_CHAN_WIDTH_UPDATE_TYPE attribute to
support handling interoperability issues with APs which don't handle
the maximum bandwidth change indication correctly.

Additionally define an enum for possible values of
QCA_WLAN_VENDOR_ATTR_CONFIG_CHAN_WIDTH_UPDATE_TYPE.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
22 months agoAdd QCA vendor attributes to indicate MLO capabilities
mukul sharma [Fri, 1 Sep 2023 11:24:05 +0000 (16:54 +0530)] 
Add QCA vendor attributes to indicate MLO capabilities

Add QCA vendor attributes to indicate various MLO capabilities supported
by the WLAN driver to userspace. These capabilities are usually reported
by the firmware during the initial bootup handshake with the driver.

Signed-off-by: Mukul Sharma <quic_mukul@quicinc.com>
22 months agoSplit long comment lines in QCA vendor related definitions
Yu Wang [Wed, 6 Sep 2023 06:10:20 +0000 (23:10 -0700)] 
Split long comment lines in QCA vendor related definitions

Fix one of the style problems in qca-vendor.h.

Signed-off-by: Yu Wang <quic_yyuwang@quicinc.com>
22 months agoFix inconsistent whitespace use in QCA vendor related definitions
Yu Wang [Wed, 6 Sep 2023 06:10:20 +0000 (23:10 -0700)] 
Fix inconsistent whitespace use in QCA vendor related definitions

Fix one of the style problems in qca-vendor.h.

Signed-off-by: Yu Wang <quic_yyuwang@quicinc.com>
22 months agoFix typos in QCA vendor related definitions
Yu Wang [Wed, 6 Sep 2023 06:10:20 +0000 (23:10 -0700)] 
Fix typos in QCA vendor related definitions

Signed-off-by: Yu Wang <quic_yyuwang@quicinc.com>
22 months agoRemove space-before-tab in QCA vendor related definitions
Yu Wang [Wed, 6 Sep 2023 06:10:20 +0000 (23:10 -0700)] 
Remove space-before-tab in QCA vendor related definitions

Fix one of the style problems in qca-vendor.h.

Signed-off-by: Yu Wang <quic_yyuwang@quicinc.com>
22 months agoTDLS: Set EHT/MLO information for TDLS STA into the driver
Kiran Kumar Lokere [Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)] 
TDLS: Set EHT/MLO information for TDLS STA into the driver

Add the copied EHT capabilities into the sta_add() call when adding a
TDLS peer.

The mld_link_id value was previously only for AP mode, but it can now be
used for TDLS links as well to indicate the link on which a
single-link-TDLS direct link is negotiated.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
22 months agoTDLS: Use link-specific BSSID instead of sm->bssid for MLO cases
Kiran Kumar Lokere [Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)] 
TDLS: Use link-specific BSSID instead of sm->bssid for MLO cases

When the current association is with an AP MLD, the BSSID for TDLS
operations needs to be selected based on which link is used to transmit
the frames.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
22 months agoTDLS: Reply to Discovery Request on the link with matching BSSID
Kiran Kumar Lokere [Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)] 
TDLS: Reply to Discovery Request on the link with matching BSSID

When the current association is with an AP MLD, the Discovery Response
needs to be sent using the link that matches the indicated BSSID.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
22 months agoTDLS: Learn MLD link ID from TDLS Discovery Response
Kiran Kumar Lokere [Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)] 
TDLS: Learn MLD link ID from TDLS Discovery Response

This is needed to be able to determine which link is used for TDLS setup
when the current association is with an AP MLD.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
22 months agoTDLS: Copy peer's EHT capabilities
Kiran Kumar Lokere [Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)] 
TDLS: Copy peer's EHT capabilities

This is needed to be able to configure the STA entry into the driver
with the information for EHT.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
22 months agonl80211: Use a QCA vendor command to set the link for TDLS Discovery Response
Kiran Kumar Lokere [Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)] 
nl80211: Use a QCA vendor command to set the link for TDLS Discovery Response

For now, only a vendor command is available for this functionality that
is needed to implement single-link TDLS during an MLO association.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
22 months agodriver: Add option for link ID to be specified for send_tdls_mgmt()
Kiran Kumar Lokere [Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)] 
driver: Add option for link ID to be specified for send_tdls_mgmt()

This is needed to allow the driver to know on which operating channel
(as specified by the link that is affiliated with AP MLD for the current
association) is used for transmitting TDLS Discovery Response. This
commit adds the link_id parameter to various functions, but does not
implement the driver interface change itself.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
22 months agoExtend wpa_parse_kde_ies() to include EHT capabilities
Kiran Kumar Lokere [Thu, 9 Feb 2023 08:25:30 +0000 (00:25 -0800)] 
Extend wpa_parse_kde_ies() to include EHT capabilities

This is needed for TDLS.

Signed-off-by: Jouni Malinen <quic_klokere@quicinc.com>
22 months agoDocument per-ESS MAC address (mac_addr=3 and mac_value)
Jouni Malinen [Thu, 7 Sep 2023 15:28:24 +0000 (18:28 +0300)] 
Document per-ESS MAC address (mac_addr=3 and mac_value)

Commit 9025def55cfd ("wpa_supplicant: Add support for pregenerated MAC")
added this capability, but did not update wpa_supplicant.conf to
document it. Add such documentation to match the information in
config_ssid.h.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agotests: Beacon protection and reconnection
Jouni Malinen [Tue, 5 Sep 2023 17:12:36 +0000 (20:12 +0300)] 
tests: Beacon protection and reconnection

Regression test case for the issue fixed in the previous commit.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoClear BIGTK values from wpa_supplicant state machine when not needed
Veerendranath Jakkam [Sun, 3 Sep 2023 19:36:41 +0000 (01:06 +0530)] 
Clear BIGTK values from wpa_supplicant state machine when not needed

wpa_supplicant does not configure BIGTK(s) to the driver when the STA
reconnects to the same AP after disconnect due to not clearing the last
configured BIGTK values during disconnect. To avoid such issues clear
the BIGTK values while clearing PTK and other group keys.

Fixes: 2d4c78aef718 ("Configure received BIGTK on station/supplicant side")
Fixes: f15cc834cb77 ("MLD STA: Processing of EAPOL-Key msg 3/4 frame when using MLO")
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
23 months agowlantest: Minimal parsing of Basic MLE STA Profile
Jouni Malinen [Fri, 1 Sep 2023 16:24:40 +0000 (19:24 +0300)] 
wlantest: Minimal parsing of Basic MLE STA Profile

Debug print RSNE and RSNXE if they are present in the STA Profile.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Defragment the Per-STA Profile subelement
Jouni Malinen [Fri, 1 Sep 2023 15:53:56 +0000 (18:53 +0300)] 
wlantest: Defragment the Per-STA Profile subelement

This subelement within the Basic MLE Link Info can be long enough to
require fragmentation, so defragment it before parsing.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Defragment Basic MLE before processing
Jouni Malinen [Fri, 1 Sep 2023 15:29:18 +0000 (18:29 +0300)] 
wlantest: Defragment Basic MLE before processing

The Basic Multi-Link element is going to be fragmented in many cases, so
defragment it first before trying to parse it.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Learn group keys from MLO FT Reassociation Response frames
Jouni Malinen [Fri, 1 Sep 2023 08:51:47 +0000 (11:51 +0300)] 
wlantest: Learn group keys from MLO FT Reassociation Response frames

Extend FT Reassociation Response frame processing to support the new MLO
GTK/IGTK/BIGTK subelements similarly to how the MLO group keys were
already learned from EAPOL-Key msg 3/4.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Fix FTE MIC calculation for MLO Reassociation Response frames
Jouni Malinen [Thu, 31 Aug 2023 21:03:16 +0000 (00:03 +0300)] 
wlantest: Fix FTE MIC calculation for MLO Reassociation Response frames

The AP's RSNE needs to be modified by inserting the PMKR1Name in the
PMKID List field for each affiliated link.

Fixes: 8cf919ffd5c4 ("wlantest: FTE MIC calculation for MLO Reassociation Response frame")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Derive PTK in MLO using MLD MAC addresses for FT over-the-air
Jouni Malinen [Thu, 31 Aug 2023 18:10:54 +0000 (21:10 +0300)] 
wlantest: Derive PTK in MLO using MLD MAC addresses for FT over-the-air

IEEE P802.11be/D4.0 does not seem to have changed the rules for deriving
PTK in FT hierarchy since there were no changes to 12.7.1.6.5 (PTK)
where BSSID and STA-ADDR are used. However, the MLO changes for FT and
for PTK derivation in non-FT cases seem to imply that this FT case is
also supposed to use MLD MAC addresses.

Commit 628b9f10223d ("wlantest: Derive PMK-R1 and PTK using AA/SPA for
MLO FT over-the-DS") did this already for FT over-the-DS, so do the same
for FT over-the-air.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Use non-AP MLD's MLD MAC address in FT over-the-air derivation
Jouni Malinen [Thu, 31 Aug 2023 17:47:00 +0000 (20:47 +0300)] 
wlantest: Use non-AP MLD's MLD MAC address in FT over-the-air derivation

S1KH-ID is supposed to be SPA, so learn the MLD MAC address of the
non-AP MLD from the FT Authentication frame and use that instead of the
link address when deriving keys in FT over-the-air case.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoDefine new BSS command info mask for AP MLD address
Kiran Kumar Lokere [Wed, 23 Aug 2023 19:40:53 +0000 (12:40 -0700)] 
Define new BSS command info mask for AP MLD address

The ap_mld_addr entry was added without introducing a new mask bit which
does not follow the expected style for adding new information into the
BSS command and might result in unexpected behavior for external
components. Define a new BSS command information mask bit for this AP
MLD address and print the AP MLD address in the BSS info only if the
mask bit is set.

Fixes: db99e7341a37 ("Add AP MLD address into BSS command output")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Determine whether A1 points to STA once in rx_data_bss_prot()
Jouni Malinen [Thu, 31 Aug 2023 12:02:02 +0000 (15:02 +0300)] 
wlantest: Determine whether A1 points to STA once in rx_data_bss_prot()

Use the initial BSS/STA routines to determine whether A1 points to STA
instead of maintaining multiple somewhat different ways of doing this.
In addition to making the code easier to maintain, this fixes at least
some cases where incorrect tx/rx_tid or rsc_tods/fromds value was
selected for 4-address frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Remove duplicated A1/A2/A3 override detection for MLO
Jouni Malinen [Thu, 31 Aug 2023 11:44:41 +0000 (14:44 +0300)] 
wlantest: Remove duplicated A1/A2/A3 override detection for MLO

Use the A1/A2/A3 overrides for MLO determined within rx_data_bss_prot()
in try_ptk_decrypt() to avoid duplicated code in these two functions.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: MLO support for decrypting 4-address frames
Jouni Malinen [Thu, 31 Aug 2023 11:32:55 +0000 (14:32 +0300)] 
wlantest: MLO support for decrypting 4-address frames

Search the A1/A2 values in 4-address frames using the MLO enabled
functions to allow appropriate STA entries to be located when these
frames are used with MLO.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Indicate ToDS/FromDS values for BSS DATA entries
Jouni Malinen [Thu, 31 Aug 2023 09:33:45 +0000 (12:33 +0300)] 
wlantest: Indicate ToDS/FromDS values for BSS DATA entries

This makes it a bit more convenient to debug decryption issues.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoAdd QCA vendor attribute for TTLM negotiation support type
Gururaj Pandurangi [Mon, 21 Aug 2023 17:26:55 +0000 (10:26 -0700)] 
Add QCA vendor attribute for TTLM negotiation support type

Add a vendor attribute for an EHT DUT to configure the type of TID-To-Link
Mapping Negotiation Support for testing purposes.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoAdd QCA vendor attribute for configuring max A-MPDU aggregation count
Will Huang [Mon, 28 Aug 2023 02:30:16 +0000 (08:00 +0530)] 
Add QCA vendor attribute for configuring max A-MPDU aggregation count

Add a QCA vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_PEER_AMPDU_CNT to
enable configuration of TX maximum aggregate size with a specific peer.
This can be used to improve performance in noisy environment. In AP
mode, the peer MAC address of the associated STA is specified with
QCA_WLAN_VENDOR_ATTR_CONFIG_PEER_MAC.

Signed-off-by: Will Huang <quic_wilhuang@quicinc.com>
23 months agoChange QCA vendor configure attribution name of peer MAC address
Will Huang [Mon, 28 Aug 2023 02:15:56 +0000 (07:45 +0530)] 
Change QCA vendor configure attribution name of peer MAC address

Rename the attribute QCA_WLAN_VENDOR_ATTR_CONFIG_RX_BLOCKSIZE_PEER_MAC
to a generic name QCA_WLAN_VENDOR_ATTR_CONFIG_PEER_MAC, so other
configuration commands can reuse it. And make backward compatibility of
QCA_WLAN_VENDOR_ATTR_CONFIG_RX_BLOCKSIZE_PEER_MAC, define it as same
value of QCA_WLAN_VENDOR_ATTR_CONFIG_PEER_MAC (35).

Signed-off-by: Will Huang <quic_wilhuang@quicinc.com>
23 months agoUpdate hw_mode when CSA finishes
Nijun Gong [Mon, 10 Jul 2023 13:19:29 +0000 (21:19 +0800)] 
Update hw_mode when CSA finishes

The driver might decide to change the operating band on its own, e.g.,
when trying to use a single channel in AP + AP case. A CSA event will be
notified to hostapd to update the channel/frequency, but hw_mode did not
get updated accordingly.

This may cause hostapd interface restarting to fail, e.g., with control
interface DISABLE / ENABLE commands at configured_fixed_chan_to_freq(),
because of the mismatch between conf->channel and conf->hw_mode.

Update hw_mode right after channel change to fix this.

Signed-off-by: ngong <quic_ngong@quicinc.com>
23 months agoSend actual MFP configuration when driver takes care of BSS selection
Veerendranath Jakkam [Mon, 28 Aug 2023 18:34:45 +0000 (00:04 +0530)] 
Send actual MFP configuration when driver takes care of BSS selection

Send the actual MFP configuration value to the driver instead of
overriding it with MFP required based on the wpa_supplicant selected BSS
when the driver takes care of BSS selection.

This is needed to allow the driver to know whether it can select an MFP
disabled BSS.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
23 months agoSCS: Add support for optional QoS Charateristics parameters
Purushottam Kushwaha [Tue, 18 Apr 2023 14:04:19 +0000 (19:34 +0530)] 
SCS: Add support for optional QoS Charateristics parameters

Per IEEE P802.11be/D4.0, 9.4.2.316 (QoS Characteristics element), enable
support for the following optional QoS Characteristics parameters:
 - Maximum MSDU Size
 - Service Start Time
 - Service Start Time LinkID
 - Mean Data Rate
 - Delayed Bounded Burst Size
 - MSDU Lifetime
 - MSDU Delivery Info
 - Medium Time

Signed-off-by: Purushottam Kushwaha <quic_pkushwah@quicinc.com>
23 months agoSCS: Add support for QoS Characteristics in SCS request
Purushottam Kushwaha [Tue, 18 Apr 2023 13:45:06 +0000 (19:15 +0530)] 
SCS: Add support for QoS Characteristics in SCS request

Add support to configure the mandatory QoS Characteristics parameters
per IEEE P802.11be/D4.0, 9.4.2.316 (QoS Characteristics element), in SCS
request:
 - Minimum Service Interval
 - Maximum Service Interval
 - Minimum Data Rate
 - Delay Bound

Enable STA SCS traffic descriptor support for EHT connection when the
connected EHT AP advertises SCS traffic descriptor capability in the EHT
Capabilities element.

Signed-off-by: Purushottam Kushwaha <quic_pkushwah@quicinc.com>
23 months agoAdd Non EHT SCS Capability in (Re)Association Request frames
Purushottam Kushwaha [Tue, 18 Apr 2023 14:24:09 +0000 (19:54 +0530)] 
Add Non EHT SCS Capability in (Re)Association Request frames

Set WFA capability to allow non-EHT SCS Traffic support in association
elements when the AP advertises support for non-EHT SCS Traffic support
via Beacon or Probe Response frame. This capability is upper layer
functionality and as such, does not need a separate driver capability
indication or configuration, but indicate this only if the AP supports
the feature to minimize risk of interoperability issues with a new
information element.

Signed-off-by: Purushottam Kushwaha <quic_pkushwah@quicinc.com>
23 months agoAdd support for conversion to little endian for 24 bits
Purushottam Kushwaha [Tue, 28 Mar 2023 12:09:59 +0000 (17:39 +0530)] 
Add support for conversion to little endian for 24 bits

Like le16/le32, add support for conversion to le24.

Signed-off-by: Purushottam Kushwaha <quic_pkushwah@quicinc.com>
23 months agoAdd QCA vendor attribute to configure MLD ID in ML probe request
Gururaj Pandurangi [Mon, 21 Aug 2023 17:30:54 +0000 (10:30 -0700)] 
Add QCA vendor attribute to configure MLD ID in ML probe request

Add a vendor attribute for EHT testbed STA to configure MLD ID in the ML
Probe Request frame transmitted as part of host initiated scan request.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Dump MLO association information in debug
Jouni Malinen [Mon, 28 Aug 2023 09:32:26 +0000 (12:32 +0300)] 
wlantest: Dump MLO association information in debug

Print the MLD MAC addresses and link addresses for both the AP MLD and
non-AP MLD when processing (Re)Association Request frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Store and check SNonce/ANonce for FT Authentication
Jouni Malinen [Mon, 28 Aug 2023 09:16:42 +0000 (12:16 +0300)] 
wlantest: Store and check SNonce/ANonce for FT Authentication

Store SNonce and ANonce from FT Authentication frames during FT
over-the-air so that these values are available for processing the FT
reassociation frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: FTE MIC calculation for MLO Reassociation Response frame
Jouni Malinen [Fri, 25 Aug 2023 17:15:22 +0000 (20:15 +0300)] 
wlantest: FTE MIC calculation for MLO Reassociation Response frame

Use the MLD MAC addresses and MLO-specific MIC calculation rules per
IEEE P802.11be/D4.0, 13.8.5.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoCalculate defragmented FTE length during IE parsing
Jouni Malinen [Fri, 25 Aug 2023 19:08:44 +0000 (22:08 +0300)] 
Calculate defragmented FTE length during IE parsing

Get rid of the warning about unrecognized Fragment element when FTE is
fragmented and make the total length of the FTE itself and the following
Fragment elements available. For now, use a separate variable for the
total length to avoid confusing existing callers.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoFix use of defragmented FTE information
Jouni Malinen [Fri, 25 Aug 2023 16:34:44 +0000 (19:34 +0300)] 
Fix use of defragmented FTE information

The FTE parser itself used valid data, but the reassembled buffer was
available only during the parser run. That buffer will be needed for the
caller as well since most of the parsed data is used as pointers instead
of copied data.

Store the reassembled buffer in struct wpa_ft_ies and require
wpa_ft_parse_ies() callers to use wpa_ft_parse_ies_free() to free any
possibly allocated temporary data after wpa_ft_parse_ies() calls that
return success (0).

Fixes: 43b5f11d969a ("Defragmentation of FTE")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoDecrement hmac_sha*_vector() maximum num_elem value to 11
Jouni Malinen [Fri, 25 Aug 2023 08:34:14 +0000 (11:34 +0300)] 
Decrement hmac_sha*_vector() maximum num_elem value to 11

This replaces the earlier commit 4c079dcc64da ("Increment
hmac_sha*_vector() maximum num_elem value to 25") with a smaller
increment of just one extra element since the updated FTE MIC
calculation design does not use separate elements. This reduces stack
memory need. In addition, this starts using a define value for the
maximum number of vector elements to make this easier to change and to
make the code more readable.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoFT: Make FTE MIC calculation more flexible
Jouni Malinen [Fri, 25 Aug 2023 08:28:44 +0000 (11:28 +0300)] 
FT: Make FTE MIC calculation more flexible

Generate the "extra" data buffer outside wpa_ft_mic() to make this
function easier to share for MLO FT Reassociation Response frame. This
replaces the earlier design in commit e6f64a8e1daf ("FT: FTE MIC
calculation for MLO Reassociation Request frame").

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Allow specific link BSS to be found with bss_find_mld()
Jouni Malinen [Fri, 25 Aug 2023 08:19:24 +0000 (11:19 +0300)] 
wlantest: Allow specific link BSS to be found with bss_find_mld()

Make this function more capable to address cases where a specific
affiliated link of an AP MLD needs to be found.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: FTE MIC calculation for MLO Reassociation Request frames
Jouni Malinen [Thu, 24 Aug 2023 15:00:31 +0000 (18:00 +0300)] 
wlantest: FTE MIC calculation for MLO Reassociation Request frames

SPA (FTO's MAC address) and AA (FTR's MAC address) are the MLD MAC
addresses when using MLO and the Reassociation Request frame will also
include the non-AP STA MAC addresses for the requested links.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoFT: FTE MIC calculation for MLO Reassociation Request frame
Jouni Malinen [Thu, 24 Aug 2023 14:58:25 +0000 (17:58 +0300)] 
FT: FTE MIC calculation for MLO Reassociation Request frame

Extend wpa_ft_mic() to take in an array of link addresses to allow the
FTE MIC to be calculated for Reassociation Request frame as described in
IEEE P802.11be/D4.0, 13.8.4. This commit does not change actual
behavior, i.e., this is just preparing wpa_ft_mic() and the existing
callers with a new argument.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoIncrement hmac_sha*_vector() maximum num_elem value to 25
Jouni Malinen [Thu, 24 Aug 2023 14:56:23 +0000 (17:56 +0300)] 
Increment hmac_sha*_vector() maximum num_elem value to 25

This is needed for FTE MIC calculation for Reassociation Request frmae
when using MLO which could add 15 link addresses into the input data.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Learn link address for assoc link from (Re)Association Request
Jouni Malinen [Thu, 24 Aug 2023 14:34:37 +0000 (17:34 +0300)] 
wlantest: Learn link address for assoc link from (Re)Association Request

Store the non-AP MLD link address of the link that is used for
association when processing (Re)Association Request frames. This is
needed to get the full set of link addresses when 4-way handshake is not
used (e.g., for FT protocol).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Learn the Link ID for AP MLD affiliated BSSs
Jouni Malinen [Thu, 24 Aug 2023 14:28:33 +0000 (17:28 +0300)] 
wlantest: Learn the Link ID for AP MLD affiliated BSSs

This allows the Link ID to be determined based on the BSS entry when
processing a frame.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Search SPA using MLO aware find for FT Request/Response frame
Jouni Malinen [Thu, 24 Aug 2023 13:57:40 +0000 (16:57 +0300)] 
wlantest: Search SPA using MLO aware find for FT Request/Response frame

This is needed to be able to find a previously added STA entry when
roaming using FT over-the-DS back to an AP MLD that was used previously.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Fix FT over-the-DS decryption
Veerendranath Jakkam [Mon, 14 Aug 2023 15:25:08 +0000 (20:55 +0530)] 
wlantest: Fix FT over-the-DS decryption

Use STA address indicated in FT Request/Response frames instead of
transmit or receive addresses for creating/finding STA instance.

For MLO to MLO roaming:
1. STA may use different link compared to FT Action frames negotiated
   links.
2. STA may reassociate with target AP MLD with different set of
   links compared to links connected to current AP MLD.

So create STA with MLD MAC address and attach to one of the BSS
affiliated with target AP MLD. Update link address of the STA and BSS
during processing of the Reassociation Request frame.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
23 months agowlantest: Derive PMK-R1 and PTK using AA/SPA for MLO FT over-the-DS
Veerendranath Jakkam [Mon, 14 Aug 2023 15:25:08 +0000 (20:55 +0530)] 
wlantest: Derive PMK-R1 and PTK using AA/SPA for MLO FT over-the-DS

Use AP and STA addresses indicated in FT Request/Response frames for
PMK-R1 and PTK derivation instead of the addresses in the BSS and STA
entries. This is needed for MLO to use the MLD MAC address instead of
one of the link addresses.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
23 months agowlantest: Use local variables for AA/SPA in FT Request/Response processing
Veerendranath Jakkam [Mon, 14 Aug 2023 15:25:08 +0000 (20:55 +0530)] 
wlantest: Use local variables for AA/SPA in FT Request/Response processing

This makes the code more readable by getting rid of the multiple
instances of references to the specifiec fields within the FT Action
frame.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
23 months agoAdd a QCA vendor sub command for transmit latency statistics
Yu Wang [Fri, 11 Aug 2023 03:45:50 +0000 (20:45 -0700)] 
Add a QCA vendor sub command for transmit latency statistics

Add a new QCA vendor sub command QCA_NL80211_VENDOR_SUBCMD_TX_LATENCY to
configure, retrieve, and report per-link transmit latency statistics.

When used as a command, userspace configures transmit latency monitoring
and get the corresponding statistics of the last period. When used as a
command response, driver replies the get action from userspace with the
statistics of the last period. When used as an event, driver reports the
statistics periodically.

Signed-off-by: Yu Wang <quic_yyuwang@quicinc.com>
23 months agoUpdate iface->current_mode when fetching new hw_features
Nijun Gong [Tue, 11 Jul 2023 13:21:21 +0000 (21:21 +0800)] 
Update iface->current_mode when fetching new hw_features

When a CHANNEL_LIST_CHANGED event is received, memory of
iface->hw_features is freed and allocated again with
hostapd_get_hw_features(), but iface->current_mode still refer to the
original memory address, which is not correct since that memory has been
freed. This could happen in cases where the driver provides channel list
updates during the lifetime of the started BSS.

Fix this by updated iface->current_mode to point to the new array of hw
features.

Fixes: 0837863fbc62 ("AP: Handle 6 GHz AP state machine with NO_IR flags")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agotests: Make sae_proto_hostapd_status_* more robust
Jouni Malinen [Tue, 22 Aug 2023 16:46:44 +0000 (19:46 +0300)] 
tests: Make sae_proto_hostapd_status_* more robust

The first MGMT-TX-STATUS event might be for the initial broadcast
Deauthentication frame instead of the SAE Authentication frame. Skip the
first event and try to process TX status for the first Authentication
frame instead.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agotests: Update RSA 3k certificates
Jouni Malinen [Tue, 22 Aug 2023 14:00:37 +0000 (17:00 +0300)] 
tests: Update RSA 3k certificates

The previous ones expired and caused test failures.

Signed-off-by: Jouni Malinen <j@w1.fi>
23 months agotests: Beacon rate configuration for 54 Mbps
Jouni Malinen [Fri, 18 Aug 2023 18:16:04 +0000 (21:16 +0300)] 
tests: Beacon rate configuration for 54 Mbps

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agonl80211: Fix beacon rate configuration for legacy rates 36, 48, 54 Mbps
Prasanna JS [Fri, 18 Aug 2023 12:31:47 +0000 (05:31 -0700)] 
nl80211: Fix beacon rate configuration for legacy rates 36, 48, 54 Mbps

Typecasting takes precedence over division here, so the legacy rates
larger than 255 * 100 kbps (i.e., 36, 48, 54 Mbps) ended up getting
truncated to invalid values.

Fix this by typecasting the value after the division.

Fixes: d4f3003c56f8 ("nl80211: Configure Beacon frame TX rate if driver advertises support")
Signed-off-by: Prasanna JS <quic_pjs@quicinc.com>
23 months agoFix hostapd interface cleanup with multiple interfaces
Jouni Malinen [Fri, 18 Aug 2023 18:00:45 +0000 (21:00 +0300)] 
Fix hostapd interface cleanup with multiple interfaces

interfaces.iface[i] might be NULL when going through the cleanup of all
remaining interfaces at the end of the process termination. The changes
for clearing drv_priv in AP MLD cause that cleanup process to crash on
dereferencing a NULL pointer.

Fix this by explicitly checking that the interface context is available
before trying to clear the pointer to driver data.

Fixes: 7fa99b3246d1 ("AP: Allow starting multiple interfaces within single MLD")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoP2P: Do not filter pref_freq_list if the driver does not provide one
Jouni Malinen [Fri, 18 Aug 2023 17:40:12 +0000 (20:40 +0300)] 
P2P: Do not filter pref_freq_list if the driver does not provide one

wpa_drv_get_pref_freq_list() may fail and the 6 GHz channel removal
should not be done unless the operation actually succeeded. The previous
implementation ended up processing uninitialized data. This did not
really result in any observable misbehavior since the result was not
used, but this showed up as a failed test case when running tests with
valgrind.

Fixes: f0cdacacb356 ("P2P: Allow connection on 6 GHz channels if requested")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agotests: P2P autonomous GO and clearing of networking information
Jouni Malinen [Fri, 18 Aug 2023 17:33:29 +0000 (20:33 +0300)] 
tests: P2P autonomous GO and clearing of networking information

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoP2P: Clean wpa_s->last_ssid when removing a temporary group network
Xin Deng [Tue, 11 Jul 2023 06:18:38 +0000 (23:18 -0700)] 
P2P: Clean wpa_s->last_ssid when removing a temporary group network

wpa_supplicant could crash due to dereferencing freed memory in a corner
case. When a reestablished P2P GO group gets removed because the
hardware mode is not supported when switching from 2.4 to 5 GHz. Group
removal in wpas_p2p_group_delete() forget to clean wpa_s->last_ssid due
to the missing wpas_notify_network_removed() call before removing the
network with wpa_config_remove_network().

That could cause a crash when flushing old BSSs which age out in
wpa_bss_flush_by_age() which uses wpa_s->last_ssid in some cases.

Fix this by invoking wpas_notify_network_removed() to clean
wpa_s->last_ssid when removing a temporary P2P group network.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoDefine QCA vendor attribute for high RSSI roam trigger threshold
Sunil Dutt [Mon, 24 Jul 2023 11:26:47 +0000 (16:56 +0530)] 
Define QCA vendor attribute for high RSSI roam trigger threshold

Define an attribute for high RSSI roam trigger threshold. STA is
expected to trigger roam if the current connected AP's RSSI gets above
this high RSSI threshold. STA's roam attempt on high RSSI threshold aims
to find candidates from other better Wi-Fi bands.

Signed-off-by: Sunil Dutt <quic_usdutt@quicinc.com>
23 months agoDefine QCA vendor roam control RSSI attributes
Ke Huang [Tue, 20 Jun 2023 08:03:34 +0000 (16:03 +0800)] 
Define QCA vendor roam control RSSI attributes

Add three vendor roam control attributes to configure the roaming
parameters dynamically.
QCA_ATTR_ROAM_CONTROL_CONNECTED_LOW_RSSI_THRESHOLD controls the
connected AP's low RSSI threshold to trigger the neighbor lookup.
QCA_ATTR_ROAM_CONTROL_CANDIDATE_ROAM_RSSI_DIFF and
QCA_ATTR_ROAM_CONTROL_6GHZ_CANDIDATE_ROAM_RSSI_DIFF control the RSSI
difference threshold between the connected AP and the new candidate AP
for the roam to trigger.

Co-authored-by: Sunil Dutt <quic_usdutt@quicinc.com>
Signed-off-by: Sunil Dutt <quic_usdutt@quicinc.com>
23 months agoExtend QCA vendor command to include more parameters for netdev events
Krunalsinh Padhar [Wed, 16 Aug 2023 19:29:17 +0000 (12:29 -0700)] 
Extend QCA vendor command to include more parameters for netdev events

Extend enum qca_wlan_vendor_attr_mlo_peer_prim_netdev_event to add MLD
MAC address, the number of links, and link info. Link info contains
ifindex and MAC address of each link of a non-AP MLD that was negotiated
in ML association.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoQCA vendor attributes for updating roaming AP BSSID info
Chunquan Luo [Tue, 8 Aug 2023 06:51:50 +0000 (23:51 -0700)] 
QCA vendor attributes for updating roaming AP BSSID info

Add vendor attribute IDs QCA_WLAN_VENDOR_ATTR_ROAM_STATS_ORIGINAL_BSSID,
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_CANDIDATE_BSSID, and
QCA_WLAN_VENDOR_ATTR_ROAM_STATS_ROAMED_BSSID for updating roaming AP
BSSID to user space to enable user space collecting the BSSID for
roaming issues.

Signed-off-by: Chunquan Luo <quic_chunquan@quicinc.com>
23 months agoEHT: 320 MHz DFS support
Chenming Huang [Fri, 14 Jul 2023 02:49:20 +0000 (08:19 +0530)] 
EHT: 320 MHz DFS support

Add support to obtain the start channel when checking whether DFS
is required when using 320 MHz channels.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoEHT: Support puncturing for 320 MHz channel bandwidth
Chenming Huang [Wed, 12 Jul 2023 03:02:32 +0000 (08:32 +0530)] 
EHT: Support puncturing for 320 MHz channel bandwidth

Determine the channel width by operating class for the 6 GHz band when
validating puncturing bitmap. This is needed to allow puncturing to be
used with 320 MHz channels.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agowlantest: Guess SAE/OWE group from EAPOL-Key length mismatch
Jouni Malinen [Fri, 11 Aug 2023 17:35:34 +0000 (20:35 +0300)] 
wlantest: Guess SAE/OWE group from EAPOL-Key length mismatch

The MIC length depends on the negotiated group when SAE-EXT-KEY or OWE
key_mgmt is used. wlantest can determine the group if the capture file
includes the group negotiation, i.e., the initial association when a PMK
was created. However, if the capture file includes only an association
using PMKSA caching, the group information is not available. This can
result in inability to be able to process the EAPOL-Key frames (e.g.,
with the "Truncated EAPOL-Key from" message).

If the negotiated group is not known and an EAPOL-Key frame length does
not seem to match the default expectations for group 19, check whether
the alternative lengths for group 20 or 21 would result in a frame that
seems to have valid length. If so, update the STA entry with the guessed
group and continue processing the EAPOL-Key frames based on this.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
23 months agoAP: Use is_zero_ether_addr() to check if BSSID is NULL
Ilan Peer [Tue, 25 Jul 2023 07:16:58 +0000 (12:46 +0530)] 
AP: Use is_zero_ether_addr() to check if BSSID is NULL

Use helper function is_zero_ether_addr() for checking empty bssid
value in hostapd_driver_init().

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Manaswini Paluri <quic_mpaluri@quicinc.com>
23 months agoAP: Add configuration option to specify the desired MLD address
Ilan Peer [Tue, 25 Jul 2023 07:16:57 +0000 (12:46 +0530)] 
AP: Add configuration option to specify the desired MLD address

Add mld_addr configuration option to set the MLD MAC address.
The already existing bssid configuration option can be used to
control the AP MLD's link addresses.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Manaswini Paluri <quic_mpaluri@quicinc.com>
23 months agohostapd: Fix AID assignment in multiple BSSID
Allen.Ye [Thu, 3 Aug 2023 12:33:55 +0000 (20:33 +0800)] 
hostapd: Fix AID assignment in multiple BSSID

When STAs connect to transmitted BSS and nontransmitted BSS, the
AP should assign the aIDs from the same pool.

Use the transmitted BSS AID pool to assign AIDs when the AP enables
multiple BSSID.

Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
23 months agowpa_supplicant: Fix configuration parsing error for tx_queue_*
Michael Lee [Thu, 27 Jul 2023 08:29:22 +0000 (16:29 +0800)] 
wpa_supplicant: Fix configuration parsing error for tx_queue_*

In the original flow, after hostapd_config_tx_queue() successfully
parses a tx_queue variable, wpa_config_process_global() would not return
immediately. Then it would print out "unknown global field" later and set
return val to -1.

Return success (0) after hostapd_config_tx_queue() successfully parses a
tx_queue variable to fix this.

Fixes: 790026c3daa2 ("Allow TX queue parameters to be configured for wpa_supplicant AP/P2P GO")
Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
23 months agoBSS coloring: Fix CCA with multiple BSS
Felix Fietkau [Mon, 7 Aug 2023 19:59:47 +0000 (21:59 +0200)] 
BSS coloring: Fix CCA with multiple BSS

Pass bss->ctx instead of drv->ctx in order to avoid multiple reports for
the first bss. The first report would otherwise clear hapd->cca_color and
subsequent reports would cause the iface bss color to be set to 0.
In order to avoid any issues with cancellations, only overwrite the color
based on hapd->cca_color if it was actually set.

Fixes: 33c4dd26cd11 ("BSS coloring: Handle the collision and CCA events coming from the kernel")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoMinor formatting changes to CCMP test vectors
Henry Ptasinski [Thu, 13 Jul 2023 13:29:32 +0000 (15:29 +0200)] 
Minor formatting changes to CCMP test vectors

Signed-off-by: Henry Ptasinski <henry@e78com.com>