]> git.ipfire.org Git - thirdparty/hostap.git/log
thirdparty/hostap.git
2 years agonl80211: Select frame TX frequency according to the transmitting link
Andrei Otcheretianski [Mon, 22 May 2023 19:33:38 +0000 (22:33 +0300)] 
nl80211: Select frame TX frequency according to the transmitting link

In MLO, multiple BSSs can transmit on different frequencies. Select
link frequencies according to the transmitter address.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agoAP: Include an RNR element in Beacon frames for AP MLD
Ilan Peer [Mon, 22 May 2023 19:33:37 +0000 (22:33 +0300)] 
AP: Include an RNR element in Beacon frames for AP MLD

- Include RNR element in Beacon frames of AP MLDs.
- Whenever a new interface is added to an AP MLD, reconfigure
  the Beacon frame templates for all other interfaces, to allow
  updating their RNR elements.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2 years agonl80211: Support setting up an AP on a specified link
Andrei Otcheretianski [Mon, 22 May 2023 19:33:35 +0000 (22:33 +0300)] 
nl80211: Support setting up an AP on a specified link

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agonl80211: Move nl80211_put_freq_params()
Andrei Otcheretianski [Mon, 22 May 2023 19:33:35 +0000 (22:33 +0300)] 
nl80211: Move nl80211_put_freq_params()

Move this static function to an earlier place within the file.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agodriver: Allow to provide a link ID when setting a channel
Ilan Peer [Mon, 22 May 2023 19:33:34 +0000 (22:33 +0300)] 
driver: Allow to provide a link ID when setting a channel

This includes:

- Modifications of the driver API, to include the link ID as part
  of 'struct hostapd_freq_params'.
- Modifications to nl80211 driver.
- Modifications for the driver wrappers.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agodriver: Add MLD link id to AP parameters
Andrei Otcheretianski [Mon, 22 May 2023 19:33:33 +0000 (22:33 +0300)] 
driver: Add MLD link id to AP parameters

To be used in later patches, e.g., for link tracking etc.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2 years agoAP: Allow starting multiple interfaces within single MLD
Andrei Otcheretianski [Mon, 22 May 2023 19:33:36 +0000 (22:33 +0300)] 
AP: Allow starting multiple interfaces within single MLD

Add support for including multiple hostapd interfaces in the same AP
MLD, i.e., all using the same underlying driver network interface.

To do so, when a new hostapd interface is added, if there is already
another interface using the same underlying network interface, associate
the new interface with the same private data object, instead of creating
a new one.

As some of the BSSs are non-first BSSs, meaning that they reuse the
drv_priv of the initial BSS, make sure not to double free it.

Currently multiple BSS entries are not supported so always use bss[0]
for MLD.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2 years agoAP: Add some basic MLD configuration options
Andrei Otcheretianski [Mon, 22 May 2023 19:33:32 +0000 (22:33 +0300)] 
AP: Add some basic MLD configuration options

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2 years agonl80211: Fetch EML/MLD capabilities
Benjamin Berg [Mon, 22 May 2023 19:33:30 +0000 (22:33 +0300)] 
nl80211: Fetch EML/MLD capabilities

Retrieve the EML capabilities as well as the MLD capabilities and ops
from nl80211 and expose them using the new driver interface
get_mld_capa().

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
2 years agoAP: MLO: Retrieve EML and MLD capabilities from driver
Benjamin Berg [Mon, 22 May 2023 19:33:31 +0000 (22:33 +0300)] 
AP: MLO: Retrieve EML and MLD capabilities from driver

Add a new driver API get_mld_capab() and and use it to fetch MLD and EML
capabilities.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
2 years agonl80211: Rename the per iface-type capabilities struct
Benjamin Berg [Mon, 22 May 2023 19:33:29 +0000 (22:33 +0300)] 
nl80211: Rename the per iface-type capabilities struct

We will start using this structure to also track MLD related
capabilities instead of just extended capabilities. As such, give the
structure a more generic name.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
2 years agotests: Fix the previous update of the regulatory database to VMs
Jouni Malinen [Tue, 6 Jun 2023 14:02:51 +0000 (17:02 +0300)] 
tests: Fix the previous update of the regulatory database to VMs

The last update of the wireless-regdb database to the wireless-regdb.git
version of 2023-02-13 in commit c4034a69fea1 ("tests: Update regulatory
database to VMs") forgot to update regulatory.db.p7s. Update it as well.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAP: Handle 6 GHz AP state machine with NO_IR flags
Pooventhiran G [Tue, 14 Mar 2023 06:05:41 +0000 (11:35 +0530)] 
AP: Handle 6 GHz AP state machine with NO_IR flags

AP cannot come up in channels that are marked as NO_IR. If AP moves to
HAPD_IFACE_DISABLED state, it will deinitialize the nl80211 driver
interface and sockets.

Hence, introduce a new state called HAPD_IFACE_NO_IR, for 6 GHz APs to
handle NO_IR scenarios, such as AFC, where the channels not allowed by
AFC will have HOSTAPD_CHAN_NO_IR flag set. In this state, AP is still
kept in a non-operational state (stopped) without deinitializing the
nl80211 driver interface. wiphy reg change event can then update the
channels and bring up the AP in a valid channel.

Signed-off-by: Pooventhiran G <quic_pooventh@quicinc.com>
2 years agoDefine a QCA vendor command to configure MLO link id for TDLS
Kiran Kumar Lokere [Thu, 11 May 2023 01:38:59 +0000 (18:38 -0700)] 
Define a QCA vendor command to configure MLO link id for TDLS

Define a QCA vendor command to configure MLO link id to the driver on
which the TDLS discovery response frame needs to be transmitted when the
local station is connected in MLO mode. This command is configured to
the driver the prior to every TDLS discover frame transmission when the
station is connected in MLO mode. If the station is connected in non-MLO
mode this command is not configured to the driver for TDLS discovery
frame transmission.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoIndicate link reconfiguration with QCA vendor interface
Veerendranath Jakkam [Wed, 24 May 2023 19:49:52 +0000 (01:19 +0530)] 
Indicate link reconfiguration with QCA vendor interface

Add support to indicate link reconfiguration event reported by the QCA
vendor interface to the wpa_supplicant control interface.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoIndicate TID to link mapping changes with QCA vendor interface
Shivani Baranwal [Wed, 24 May 2023 09:14:55 +0000 (14:44 +0530)] 
Indicate TID to link mapping changes with QCA vendor interface

Add support to indicate TID-to-link mapping changes reported by the QCA
vendor interface to the wpa_supplicant control interface.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agotests: PASN with pasn_noauth=0
Jouni Malinen [Thu, 25 May 2023 19:59:00 +0000 (22:59 +0300)] 
tests: PASN with pasn_noauth=0

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoPASN: Introduce configuration option to allow/deny PASN-UNAUTH
Sai Pratyusha Magam [Wed, 17 May 2023 04:50:38 +0000 (10:20 +0530)] 
PASN: Introduce configuration option to allow/deny PASN-UNAUTH

Per IEEE P802.11az/D7.0, 12.12.3.2 (PASN Frame Construction and
Processing), responder should REFUSE PASN authentication frame 1 with
Base AKM as PASN AKM if dot11NoAuthPASNActivated is false. That
configuration was not previously available and hostapd was hardcoded
with dot11NoAuthPASNActivated being true.

Allow this to be configured and reject PASN authentication frame 1 from
initiator if pasn_noauth=0 and Base AKM in RSNE of this frame is PASN.
The default value for pasn_noauth is 1 to maintain previous
functionality even though the dot11NoAuthPASNActivated is defined to
have default value of false.

Signed-off-by: Sai Pratyusha Magam <quic_smagam@quicinc.com>
2 years agoIncrease MAX_NL80211_NOISE_FREQS in survey dump handler for 6 GHz
Ainy Kumari [Thu, 25 May 2023 11:19:14 +0000 (16:49 +0530)] 
Increase MAX_NL80211_NOISE_FREQS in survey dump handler for 6 GHz

The current value of 50 is not sufficient for getting survey info for
all the frequencies when the 6 GHz band is enabled. Increase the limit
to 100 to be able to receive survey info for 6 GHz frequencies also.

Signed-off-by: Ainy Kumari <quic_ainykuma@quicinc.com>
2 years agoMLD STA: Use AP MLD address as previous BSSID for reassociation requests
Veerendranath Jakkam [Fri, 5 May 2023 11:17:42 +0000 (16:47 +0530)] 
MLD STA: Use AP MLD address as previous BSSID for reassociation requests

The Linux kernel expects to use the AP MLD address in
NL80211_ATTR_PREV_BSSID for reassociation requests when the current
association is MLO capable.

Previously, wpa_supplicant was using the BSSID value in
NL80211_ATTR_PREV_BSSID even if the connection is MLO capable. Fix this
by sending the AP MLD address in NL80211_ATTR_PREV_BSSID for
reassociation requests when MLO is used.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Allow auth frames without ML IE for failure status codes
Veerendranath Jakkam [Tue, 9 May 2023 13:53:21 +0000 (19:23 +0530)] 
MLD STA: Allow auth frames without ML IE for failure status codes

In some cases like unknown-group rejection, AP MLD can't parse the
received Authentication frame to the point of the Multi-Link element if
the group used by the peer is unknown to the AP MLD.

In such cases, AP MLD not including Multi-Link element in rejection
Authentication frames can be considered as standard compliant since AP
MLD doesn't know whether the received Authentication frame has
Multi-Link element or not.

To avoid connection issues in such cases, don't reject Authentication
frames without Multi-Link element when status code is other than
WLAN_STATUS_SUCCESS, WLAN_STATUS_SAE_HASH_TO_ELEMENT,
WLAN_STATUS_SAE_PK, and WLAN_STATUS_ANTI_CLOGGING_TOKEN_REQ.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoAdd QCA vendor command to indicate STA MLD setup links removal
Shivani Baranwal [Wed, 3 May 2023 03:59:32 +0000 (09:29 +0530)] 
Add QCA vendor command to indicate STA MLD setup links removal

Add a new vendor command and attributes to indicate STA MLD setup links
removal.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoAdd QCA vendor command to notify TID-to-Link mapping changes
Shivani Baranwal [Fri, 28 Apr 2023 10:01:46 +0000 (15:31 +0530)] 
Add QCA vendor command to notify TID-to-Link mapping changes

Add a new vendor command and attributes to notify TID-to-link mapping
changes to the userspace.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoWPS: Fix multi-ap fronthaul association
Sathishkumar Muruganandam [Sat, 20 May 2023 06:36:07 +0000 (12:06 +0530)] 
WPS: Fix multi-ap fronthaul association

Setting 4addr mode on fronthaul BSS breaks WPS association on backhaul
STA which is still on 3addr mode.

Fix the interop issue by not setting 4addr mode on fronthaul BSS with
WPS instead of setting by default for multi-ap case.

Fronthaul BSS for non-WPS STA shall continue to use 4addr mode.

Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
2 years agoStore pmk_r1_name derived with wpa_ft_local_derive_pmk_r1() properly
Adil Saeed Musthafa [Thu, 4 May 2023 16:34:51 +0000 (09:34 -0700)] 
Store pmk_r1_name derived with wpa_ft_local_derive_pmk_r1() properly

The parameter req_pmk_r1_name was not used at all in the function
wpa_ft_local_derive_pmk_r1(). In addition, the PMK-R1-NAME should be
updated in this function along with the PMK-R1. This means the parameter
should change from "req_pmk_r1_name" to "out_pmk_r1_name" to match the
design used for other paths that derive the PMK-R1.

sm->pmk_r1_name needs to be properly updated when pmk_r1_name is derived
from the local pmk_r0.

Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
2 years agoDo prune_association only after the STA is authorized
Adil Saeed Musthafa [Thu, 11 May 2023 18:43:02 +0000 (11:43 -0700)] 
Do prune_association only after the STA is authorized

Prune-associations should be done only after the new station is
authorized. Otherwise any STA can cause denial of service to connected
stations in PMF case when more than a single interface is being
controlled by the same hostapd process.

Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>
2 years agoDefine a QCA vendor attribute to update the CTS channel width
Kiran Kumar Lokere [Mon, 8 May 2023 21:39:57 +0000 (14:39 -0700)] 
Define a QCA vendor attribute to update the CTS channel width

Define a new QCA vendor attribute to configure channel bandwidth to the
driver for CTS frame transmission. This is used for testing purposes.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd a new driver feature flag for enhanced audio experience over WLAN
Purushottam Kushwaha [Wed, 26 Apr 2023 13:30:48 +0000 (19:00 +0530)] 
Add a new driver feature flag for enhanced audio experience over WLAN

Add QCA_WLAN_VENDOR_FEATURE_ENHANCED_AUDIO_EXPERIENCE_OVER_WLAN in
enum qca_wlan_vendor_features to indicate the device supports enhanced
audio experience over WLAN feature.

Also, update the documentation where other subcommand(s) or attribute(s)
require this new feature flag. These subcommand(s) and attributes are
under development and would be restricted to the supported drivers
advertising QCA_WLAN_VENDOR_FEATURE_ENHANCED_AUDIO_EXPERIENCE_OVER_WLAN.
As such, it is still acceptable to introduce a new requirement for the
previously defined interface.

Signed-off-by: Purushottam Kushwaha <quic_pkushwah@quicinc.com>
2 years agoAdd vendor attributes for forcing MLO power save and STR TX
Gururaj Pandurangi [Wed, 19 Apr 2023 22:59:11 +0000 (15:59 -0700)] 
Add vendor attributes for forcing MLO power save and STR TX

Add vendor attributes for EHT testbed STA configuration.
This includes enabling STR MLMR mode and forcing power save
on active MLO links for a defined number of beacon periods.

Signed-off-by: Gururaj Pandurangi <quic_panduran@quicinc.com>
2 years agoAdd vendor attributes for EHT OM control, EMLSR padding delay
Gururaj Pandurangi [Tue, 18 Apr 2023 01:06:37 +0000 (18:06 -0700)] 
Add vendor attributes for EHT OM control, EMLSR padding delay

Add vendor attributes related to MLO and EMLSR mode
capability configuration for EHT testbed STA. It includes
EHT OM control support and EMLSR padding delay configuration.
Also, generalise the naming of HE OMI control enumeration to
OMI control as it now consists of both HE and EHT OMI control
fields.

Signed-off-by: Gururaj Pandurangi <quic_panduran@quicinc.com>
2 years agotests: WPA2-EAP AP with PMF required and EAPOL-Logoff
Jouni Malinen [Thu, 4 May 2023 07:23:22 +0000 (10:23 +0300)] 
tests: WPA2-EAP AP with PMF required and EAPOL-Logoff

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoDo not disconnect EAPOL-Logoff before authentication
Jouni Malinen [Thu, 4 May 2023 07:18:34 +0000 (10:18 +0300)] 
Do not disconnect EAPOL-Logoff before authentication

Some station devices are apparently sending the EAPOL-Logoff message in
some cases before the initial authentication for WPA2/WPA3-Enterprise.
hostapd would have forced a "post EAP-Failure" disconnection in 10 ms
for such cases while still allowing the EAP authentication to try to
complete.

This is not ideal and could result in interoperability issues, so skip
the forced disconnection in the particular case where the EAPOL-Logoff
message is received before the first authentication is completed.

In addition, disconnect the STA without starting new EAP authentication
and the 10 ms delay if an EAPOL-Logoff message is received after
authentication has been completed successfully. This results in cleaner
behavior by avoiding the extra start of a new EAP authentication in a
case where the STA is going to be disconnected shortly.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agowpa_supplicant: Skip scan before starting a BSS in AP mode
Jintao Lin [Thu, 20 Apr 2023 21:36:40 +0000 (21:36 +0000)] 
wpa_supplicant: Skip scan before starting a BSS in AP mode

When starting a new BSS as AP mode, the network configs have been passed
in from the BSS config. There is no need to scan before creating a new
BSS. Reuse connect_without_scan structure member to bypass scan when the
mode is WPAS_MODE_AP.

Signed-off-by: Jintao Lin <jintaolin@chromium.org>
2 years agowpa_supplicant: Fix compiling without IEEE8021X_EAPOL
Nick Hainke [Tue, 14 Mar 2023 21:17:19 +0000 (22:17 +0100)] 
wpa_supplicant: Fix compiling without IEEE8021X_EAPOL

If IEEE8021X_EAPOL is not defined wpa_supplicant will not compile with
following error:

  events.c: In function 'wpa_supplicant_connect':
  events.c:1827:14: warning: implicit declaration of function 'eap_is_wps_pbc_enrollee' [-Wimplicit-function-declaration]
   1827 |         if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
        |              ^~~~~~~~~~~~~~~~~~~~~~~
  events.c:1827:43: error: 'struct wpa_ssid' has no member named 'eap'
   1827 |         if ((eap_is_wps_pbc_enrollee(&ssid->eap) &&
        |                                           ^~

Add ifdef statements around the calling function to fix the issue.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoAdd missing driver entries to wpa_supplicant documentation
Benjamin Poirier [Wed, 5 Apr 2023 21:40:25 +0000 (17:40 -0400)] 
Add missing driver entries to wpa_supplicant documentation

There are possible more entries missing but I added only the ones I was
actually able to build.

Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
2 years agoDPP: Remove argument requirement for DPP push button command
Andrew Pope [Wed, 19 Apr 2023 03:12:30 +0000 (13:12 +1000)] 
DPP: Remove argument requirement for DPP push button command

The hostapd_cli command to initiate DPP push button mode mandates at
least one argument to be provided. Arguments provided to the command
are used to optionally supply configuration options when running in
this mode. They are not strictly required for DPP push button mode to
start. This patch removes the min requirement check on the command.

Signed-off-by: Andrew Pope (andrew.pope@morsemicro.com)
2 years agoAdd vendor attributes for MLO link active, EMLSR entry/exit
Gururaj Pandurangi [Tue, 18 Apr 2023 01:00:53 +0000 (18:00 -0700)] 
Add vendor attributes for MLO link active, EMLSR entry/exit

Add vendor attributes related to MLO and EMLSR mode
capability configuration for EHT DUT. This includes forcing
active MLO links and invoking EMLSR mode entry or exit.

Signed-off-by: Gururaj Pandurangi <quic_panduran@quicinc.com>
2 years agotests: Additional 6 GHz band ACS coverage
Jouni Malinen [Wed, 26 Apr 2023 18:39:12 +0000 (21:39 +0300)] 
tests: Additional 6 GHz band ACS coverage

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Update regulatory database to VMs
Jouni Malinen [Wed, 26 Apr 2023 18:28:23 +0000 (21:28 +0300)] 
tests: Update regulatory database to VMs

Update the wireless-regdb database to the wireless-regdb.git version of
2023-02-13.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoRename VHT elements to match the standard
Jouni Malinen [Wed, 26 Apr 2023 18:15:25 +0000 (21:15 +0300)] 
Rename VHT elements to match the standard

Some of the information elements added in IEEE Std 802.11ax-2013 for VHT
purposes have since then been taken into use for other cases and renamed
to remove the "VHT" prefix in the standard. Update the defines for those
elements in the implementation to match the names used in the current
standard.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agohostapd: Support channel switch to 320 MHz channels
Ramya Gnanasekar [Mon, 3 Apr 2023 01:34:57 +0000 (07:04 +0530)] 
hostapd: Support channel switch to 320 MHz channels

Add validatation of center frequency, and filling of appropriate
bandwidth in the channel switch wrapper when the channel switch is done
to a 320 MHz channel.

Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
2 years agoFix file mode bits
Jouni Malinen [Wed, 26 Apr 2023 20:08:38 +0000 (23:08 +0300)] 
Fix file mode bits

The execute bits were not supposed to be added to a source code file.

Fixes: 927dbfb453ed ("Fix 40 MHz channel bringup with ACS on the 6 GHz band")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: HE with ACS on 6 GHz using a 40 MHz channel
Jouni Malinen [Tue, 25 Apr 2023 14:31:13 +0000 (17:31 +0300)] 
tests: HE with ACS on 6 GHz using a 40 MHz channel

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoSelect 6 GHz mode correctly for ACS cases
Jouni Malinen [Tue, 25 Apr 2023 14:29:46 +0000 (17:29 +0300)] 
Select 6 GHz mode correctly for ACS cases

Use the op_class configuration to determine whether to select the 5 GHz
or 6 GHz mode for ACS. Without this, the first mode (5 GHz in most
cases) would have been selected regardless of the op_class value.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFix 40 MHz channel bringup with ACS on the 6 GHz band
Hari Chandrakanthan [Wed, 19 Apr 2023 12:05:11 +0000 (17:35 +0530)] 
Fix 40 MHz channel bringup with ACS on the 6 GHz band

When AP is brought up in HE40/EHT40 with ACS, the AP comes up with 20
MHz bandwidth. It is expected to come up with 40 MHz bandwidth.

conf->secondary_channel does not hold the correct value and it leads to
choosing 20 MHz in hostapd_set_freq_params(). conf->secondary_channel is
filled using the hostapd config he_oper_centr_freq_seg0_idx. When AP is
configured to use ACS, the hostapd config he_oper_centr_freq_seg0_idx is
not valid as the channel is not known during bring up. So using the
config he_oper_centr_freq_seg0_idx to fill the conf->secondary_channel
does not work with ACS.

Use op_class to determine the bandwidth and based on the bandwidth fill
the conf->secondary_channel to address this ACS case.

Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
2 years agoAllow MLO disabled connection to legacy open/WPA2-Personal-only AP MLDs
Veerendranath Jakkam [Thu, 23 Mar 2023 13:33:01 +0000 (19:03 +0530)] 
Allow MLO disabled connection to legacy open/WPA2-Personal-only AP MLDs

wpa_supplicant was skipping MLD APs from network selection when the AP
advertise legacy open, WPA2-Personal-only (PSK without SAE), or PMF
disabled. However, there are already some early Wi-Fi 7 APs in the
market which advertise legacy open, WPA2-Personal-only, or PMF disabled
even though these combinations are unlikely to be allowed for Wi-Fi 7 in
the end.

To avoid connectivity issues with such APs, allow stations to connect
with MLO disabled when an AP MLD is detected to advertise legacy open,
WPA2-Personal-only (PSK without SAE), or PMF disabled.

This reverts commit 7d8b96dcfdbb ("wpa_supplicant: Apply same
restrictions for MLD as for 6 GHz BSS") except WEP and TKIP checks,
i.e., AP MLDs which advertise only WEP or TKIP are still skipped from
network selection.

For the SME-in-wpa_supplicant case, skip configuring MLD parameters to
the driver if the STA can connect only in legacy open,
WPA2-Personal-only, or PMF disabled mode. For the SME-in-driver case, it
is the driver's responsibility to initiate connection with MLO disabled
with such APs.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoUpdate AP RSNE/RSNXE to RSN state machine on driver-selected BSS cases
Jouni Malinen [Tue, 25 Apr 2023 10:30:08 +0000 (13:30 +0300)] 
Update AP RSNE/RSNXE to RSN state machine on driver-selected BSS cases

The driver-initiated BSS selection case and the "Network configuration
found for the current AP" case ended up clearing the RSN state machine
information on AP RSNE/RSNXE. That could result in incorrect behavior if
some key management operations depended on accurate information. For
example, this could result in not deriving the KDK as part of the PTK
derivation and failing to complete 4-way handshake if both the AP and
the STA indicated support for Secure LTF.

If the scan results for the selected BSS are available, use those to
update the RSN state machine AP RSNE/RSNXE similarly to the way this is
done with wpa_supplicant selects the BSS instead of clearing that
information in the RSN state machine.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: KDK derivation based on Secure LTF capability
Jouni Malinen [Tue, 25 Apr 2023 09:08:12 +0000 (12:08 +0300)] 
tests: KDK derivation based on Secure LTF capability

This adds more production-like testing coverage for KDK derivation. Both
SAE and OWE transition mode are covered. The latter has some corner
cases that did not work correctly previously.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoOWE: Update transition mode information on selecting a new BSS
Jouni Malinen [Tue, 25 Apr 2023 09:04:01 +0000 (12:04 +0300)] 
OWE: Update transition mode information on selecting a new BSS

It is possible for a new BSS entry to be added for the
hidden-SSID-OWE-BSS when running a new scan after having previously
learned the hidden SSID during a previous OWE connection attempt. That
new entry would not necessarily have the WPA_BSS_OWE_TRANSITION flag set
and that would result in not being able to recognize the appropriate OWE
profile when checking the association event against the transition mode
configuration.

Fix this by updating the BSS entry for OWE transition mode information
for the cases where this might happen.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoFix determining mode for 6 GHz band when using hw_mode=any
Xinyue Ling [Fri, 14 Apr 2023 07:58:03 +0000 (00:58 -0700)] 
Fix determining mode for 6 GHz band when using hw_mode=any

When 6 GHz band is specified and hw_mode parameter is set to any,
hostapd_determine_mode() may determine the wrong mode because there are
two hw modes (5 GHz and 6 GHz) with HOSTAPD_MODE_IEEE80211A. This will
cause 6 GHz AP to fail to start. Fix this by adding a check similar to
the changes in commit 99cd453720d6 ("hw_feature: Correctly select mode
in case of the 6 GHz band") into hostapd_determine_mode().

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd support to fetch link layer stats per MLO link
Shivani Baranwal [Wed, 5 Apr 2023 18:07:52 +0000 (23:37 +0530)] 
Add support to fetch link layer stats per MLO link

IEEE 802.11be enables multiple links between STA and AP. Each of the
link has its own set of statistics. Add additional attributes required
to fetch link layer statistics per MLO link.

For MLO connection, per MLO link statistics will be sent with the new
attribute QCA_WLAN_VENDOR_ATTR_LL_STATS_MLO_LINK. Also, cumulative
statistics of all the MLO links will be sent outside
QCA_WLAN_VENDOR_ATTR_LL_STATS_MLO_LINK to be compatible with legacy user
space.

For non-MLO connection, the statistics will be sent without being nested
inside QCA_WLAN_VENDOR_ATTR_LL_STATS_MLO_LINK attribute.

Co-authored-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoFix vendor attribute numbering and relocate attribute accordingly
Shivani Baranwal [Fri, 14 Apr 2023 09:52:08 +0000 (15:22 +0530)] 
Fix vendor attribute numbering and relocate attribute accordingly

The attributes QCA_WLAN_VENDOR_ATTR_LL_STATS_PAD and
QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NF_CAL_VAL were allocated the same
attribute number in error. QCA_WLAN_VENDOR_ATTR_LL_STATS_PAD attribute
is known to not be used; thus, it is safe to be renumbered.

Fixes: 1491fc64a820 ("Define QCA vendor per-enum 64-bit pad attributes")
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agoAdd a vendor specific roam status of background scan abort
Chunquan Luo [Wed, 19 Apr 2023 11:28:06 +0000 (04:28 -0700)] 
Add a vendor specific roam status of background scan abort

When user space triggers a scan, the firmware aborts background scan,
and uses the roam status QCA_ROAM_FAIL_REASON_CURR_AP_STILL_OK instead
of "Invalid roam failures reason".

Signed-off-by: Chunquan Luo <quic_chunquan@quicinc.com>
2 years agoUpdate QCA LL_STATS vendor command
Aditya Kodukula [Mon, 10 Apr 2023 15:29:42 +0000 (08:29 -0700)] 
Update QCA LL_STATS vendor command

Define bitmap values used by LL_STATS vendor command
and update the corresponding kernel documentation.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoSAE: Fix expected AP MLD address info in a debug print
Veerendranath Jakkam [Wed, 12 Apr 2023 22:52:51 +0000 (04:22 +0530)] 
SAE: Fix expected AP MLD address info in a debug print

Print correct expected AP MLD address information when the AP MLD
address validation fails in Authentication frames during external
authentication.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoMLD STA: Do not fail on unknown IEs in Authentication frames
Veerendranath Jakkam [Wed, 12 Apr 2023 22:21:15 +0000 (03:51 +0530)] 
MLD STA: Do not fail on unknown IEs in Authentication frames

Fail MLD address validation only if Authentication frames IE parsing
actually failed, i.e., ignore all unknown IEs.

This is needed to avoid authentication failure when the Authentication
frames include IEs which are not handled by ieee802_11_parse_elems(),
e.g., AKM Suite Selector IE.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agohostapd: Restore the flow of set beacon and WPA key init
Xin Deng [Tue, 11 Apr 2023 10:24:58 +0000 (18:24 +0800)] 
hostapd: Restore the flow of set beacon and WPA key init

hostapd start AP flow changed in commit 931e5d4f9e2e. However, that
could cause a regression in a legacy AP driver where the set key
operation for GTK, IGTK, and BIGTK before AP start (set beacon) would
cause the driver to ignore the key set command. Restore the flow of the
set beacon and WPA key init operations to make sure drivers can receive
and set group keys correctly.

Fixes: 931e5d4f9e2e ("mbssid: Configure all BSSes before beacon setup")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoExport wpa_supplicant config item 'he' for external configuration
Chaoli Zhou [Fri, 7 Apr 2023 06:33:52 +0000 (14:33 +0800)] 
Export wpa_supplicant config item 'he' for external configuration

Export the "he" network profile item to be configurable from external
client side, like wpa_cli or NetworkManager. This follows the earlier
changes to allow the previously internal-only parameter (e.g., vht) to
be used for additional purposes for AP mode.

Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
2 years agoAllowed frequency list configuration for AP operation
Veerendranath Jakkam [Mon, 3 Apr 2023 02:41:36 +0000 (08:11 +0530)] 
Allowed frequency list configuration for AP operation

Add support to configure the allowed frequency list for AP operation
using a QCA vendor interface before NL80211_CMD_NEW_BEACON/
NL80211_CMD_START_AP. hostapd generates the allowed frequency list by
intersecting user configured frequency list and all the frequencies
advertised by the driver including disabled channels. If user doesn't
specify allowed frequency list, all the frequencies advertised by the
driver, including disabled channels, will be configured.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agotests: Update server and user certificates (2023)
Jouni Malinen [Tue, 18 Apr 2023 08:04:43 +0000 (11:04 +0300)] 
tests: Update server and user certificates (2023)

At least some of the previous versions have expired, so need to re-sign
these to avoid EAP test case failures. This contains updates from
running tests/hwsim/auth_server/update.sh.

Signed-off-by: Jouni Malinen <j@w1.fi>
2 years agoWMM: Advertise support for 16 PTKSA replay counters for non-AP STA
Jouni Malinen [Wed, 12 Apr 2023 15:46:53 +0000 (18:46 +0300)] 
WMM: Advertise support for 16 PTKSA replay counters for non-AP STA

In theory, each device that supports WMM (or the IEEE 802.11 QoS for
that matter) is expected to advertise how many replay counters it
supports and the peer device is supposed to use that information to
restrict the total number of different MSDU priorities (AC/UP) that
might be used. In practice, this is not really done in deployed devices
and instead, it is just assumed that everyone supports the eight
different replay counters so that there is no need to restrict which
MSDU priorities can be used.

hostapd implementation of WMM has advertised support for 16 PTKSA replay
counters from the beginning while wpa_supplicant has not had any code
for setting the supported replay counter fields in RSNE, i.e., has left
the value to 0 which implies that only a single replay counter is
supported. While this does not really result in any real issues with
deployed devices, this is not really correct behavior based on the
current IEEE 802.11 standard and the WMM specification.

Update wpa_supplicant to use similar design to the hostapd RSNE
generation by setting the number of supported PTKSA replay counters to
16 whenever WMM is enabled. For now, this is done based on the
association being for HT/VHT/HE/EHT and also based on the AP supporting
WMM since it is much more likely for the local device to support WMM and
eight replay counters (which can be indicated only with the value that
implies support for 16 counters since there is no separate value for 8).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agonl80211: Support for RNR elements
Aloka Dixit [Tue, 4 Apr 2023 17:59:00 +0000 (10:59 -0700)] 
nl80211: Support for RNR elements

Add new nested netlink attribute, NL80211_ATTR_EMA_RNR_ELEMS, to send
the reduced neighbor report (RNR) elements to the driver when EMA is
enabled. This attribute includes the count of RNR elements and data at
each index. While generating EMA beacons, the driver will include RNR
group at a given index along with MBSSID group. The last element, if
present, has RNR data common for all EMA beacons such as neighbor APs.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoRNR: Add elements by default for EMA AP
Aloka Dixit [Tue, 4 Apr 2023 17:58:59 +0000 (10:58 -0700)] 
RNR: Add elements by default for EMA AP

As per IEEE Std 802.11ax-2021, 11.1.3.8.3 Discovery of
a nontransmitted BSSID profile, an EMA AP that transmits a Beacon
frame carrying a partial list of nontransmitted BSSID profiles
should include in the frame a Reduced Neighbor Report element
carrying information for at least the nontransmitted BSSIDs that
are not present in the Multiple BSSID element carried in that frame.

Add this support by splitting the reduced neighbor report (RNR) in as
many elements as the number of multiple BSSID elements. Each RNR element
excludes the non-transmitting profiles already included in the MBSSID
element at the same index. If present, the last additional group will
have the data common for all EMA beacons such as neighbor AP information
gathered through neighbor reports.

The hwsim test case he_ap_ema demonstrates this support.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoRNR: Skip interfaces on the same radio for MBSSID
Aloka Dixit [Tue, 4 Apr 2023 17:58:58 +0000 (10:58 -0700)] 
RNR: Skip interfaces on the same radio for MBSSID

Do not include interfaces on the same radio in reduced neighbor
report elements (RNR) as multiple BSSID elements from the same
management frame already include these if MBSSID feature is enabled.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoSync with wireless-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Thu, 6 Apr 2023 10:02:45 +0000 (13:02 +0300)] 
Sync with wireless-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2023-03-30.

Signed-off-by: Jouni Malinen <j@w1.fi>
2 years agoAdd QCA vendor feature flag for allowed frequency list
Veerendranath Jakkam [Fri, 24 Feb 2023 10:17:59 +0000 (15:47 +0530)] 
Add QCA vendor feature flag for allowed frequency list

Add a vendor feature flag for the driver to indicate support for allowed
frequency configuration in AP mode.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoAdd QCA vendor interface to get connected channels utilization
Ainy Kumari [Wed, 15 Mar 2023 09:49:33 +0000 (15:19 +0530)] 
Add QCA vendor interface to get connected channels utilization

Add a new vendor command to trigger computation of connected channel
statistics such as channel utilization in STA mode.

Signed-off-by: Ainy Kumari <quic_ainykuma@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoAdd QCA vendor attribute to configure list of allowed frequencies for AP
Veerendranath Jakkam [Fri, 24 Feb 2023 10:17:59 +0000 (15:47 +0530)] 
Add QCA vendor attribute to configure list of allowed frequencies for AP

Define a new attribute QCA_WLAN_VENDOR_ATTR_CONFIG_AP_ALLOWED_FREQ_LIST
to configure the full list of allowed frequencies for the AP operation.
The configuration is valid only from the next BSS start until the BSS is
stopped. The drivers shall filter out channels on top of this list of
channels based on regulatory or other constraints. This can be used to
specify user's choice of frequencies, allowed list of channels with
static puncturing feature, etc.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2 years agoAdd 40 and 80 MHz channels 165 and 173 for 5 GHz IBSS/mesh
Seevalamuthu Mariappan [Wed, 29 Mar 2023 05:12:42 +0000 (10:42 +0530)] 
Add 40 and 80 MHz channels 165 and 173 for 5 GHz IBSS/mesh

Add the channels 165 and 173 in allowed channels for ht40_plus. Also add
the allowed frequency 5825 (channel 165; channel center frequency index
171) for 80 MHz bandwidth.

Signed-off-by: Seevalamuthu Mariappan <quic_seevalam@quicinc.com>
Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
2 years ago6 GHz: Fix secondary channel setting
Jouni Malinen [Wed, 29 Mar 2023 15:25:37 +0000 (18:25 +0300)] 
6 GHz: Fix secondary channel setting

center_idx_to_bw_6ghz() does not return the bandwidth in MHz and as
such, the check here against 20 (MHz) is never true. The returned value
is greater than 0 for the over 20 MHz cases.

Fixes: 15742566fd7c ("6 GHz: Fix operating class in Supported Operating Classes element")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd 6 GHz channel validation during channel switching
Anilkumar Kolli [Mon, 13 Mar 2023 05:43:02 +0000 (11:13 +0530)] 
Add 6 GHz channel validation during channel switching

The following command does not return FAIL, but it fails to update the
beacon since the center frequency used in the command is not valid for
80 MHz bandwidth.

 hostapd_cli -i wlan0 chan_switch 5 6315 sec_channel_offset=1 \
 center_freq1=6345 bandwidth=80 he

Add condition check to validate the center frequency.

Also, if user doesn't provide HE parameter in the hostapd_cli
chan_switch command, by default HE should be enabled for 6 GHz
frequency range. This is because, 6 GHz does not support legacy
mode.

Signed-off-by: Anilkumar Kolli <quic_akolli@quicinc.com>
Co-developed-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
2 years agoSet interface state as inactive if mesh bringup fails
Hari Chandrakanthan [Tue, 21 Mar 2023 15:17:27 +0000 (20:47 +0530)] 
Set interface state as inactive if mesh bringup fails

The STATUS command showed the interface state as SCANNING even if mesh
bringup fails. This incorrect interface status can mislead
scripts/applications that rely on interface status to bring up different
type of virtual interfaces (AP/MESH) on a single radio.

Fix this by setting the interface status as INACTIVE if mesh bringup
fails.

Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
2 years agoHandle signal termination in hostapd_cli for all cases
Sai Pratyusha Magam [Sun, 26 Mar 2023 16:03:30 +0000 (21:33 +0530)] 
Handle signal termination in hostapd_cli for all cases

hostapd_cli did not clean up the sockets and attachments to receive
hostapd events when SIGTERM was used to terminate it in action script
mode.

Do proper cleanup by convering the action script processing
functionality to use eloop similarly to the wpa_cli changes in commit
13f6f617eeca ("wpa_cli: Fix process termination in wpa_cli action mode
case") and by registering the process termination signal handler for all
cases instead of just for the interactive mode.

Signed-off-by: Sai Pratyusha Magam <quic_smagam@quicinc.com>
2 years agowlantest: MLO aware STA entry search for unprotected Data frames
Jouni Malinen [Mon, 27 Mar 2023 14:26:41 +0000 (17:26 +0300)] 
wlantest: MLO aware STA entry search for unprotected Data frames

Find a STA entry based on MLO affiliated link addresses for the case
where an unprotected Data frame is being processed. This extends the
changes in commit 228420e2d9a8 ("wlantest: Find a STA entry based on MLO
affiliated link addresses") to cover the unencrypted case. This is
needed in particular for the Null frames used for managing the power
save state to avoid generating duplicate STA entries that can mess up
key information for the following frames.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agotests: Suite B 192-bit RSA with TLS 1.3
Jouni Malinen [Wed, 22 Mar 2023 22:00:10 +0000 (00:00 +0200)] 
tests: Suite B 192-bit RSA with TLS 1.3

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoOpenSSL: Add TLS 1.3 signature algorithms for Suite B
Jouni Malinen [Wed, 22 Mar 2023 21:58:47 +0000 (23:58 +0200)] 
OpenSSL: Add TLS 1.3 signature algorithms for Suite B

These are needed to allow the Suite B 192-bit negotiation to succeed
when using TLS 1.3 (which is still disabled by default).

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoAdd support to send 320 MHz bandwidth through vendor subcmd
Ainy Kumari [Thu, 16 Mar 2023 07:09:32 +0000 (12:39 +0530)] 
Add support to send 320 MHz bandwidth through vendor subcmd

Extend QCA_WLAN_VENDOR_ATTR_CONFIG_CHANNEL_WIDTH to configure 320 MHz
bandwidth to the driver/firmware.

Signed-off-by: Ainy Kumari <quic_ainykuma@quicinc.com>
2 years agoEHT: Validate the puncturing bitmap for ACS
Aloka Dixit [Tue, 14 Mar 2023 04:59:25 +0000 (21:59 -0700)] 
EHT: Validate the puncturing bitmap for ACS

Validate the generated puncturing bitmap against non-OFDMA patterns.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoEHT: Calculate puncturing bitmap for ACS
Aloka Dixit [Tue, 14 Mar 2023 04:59:24 +0000 (21:59 -0700)] 
EHT: Calculate puncturing bitmap for ACS

Generate puncturing bitmap after the ideal channel selection using
the threshold.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoEHT: Configuration option for ACS puncturing threshold
Aloka Dixit [Tue, 14 Mar 2023 04:59:23 +0000 (21:59 -0700)] 
EHT: Configuration option for ACS puncturing threshold

Add a new option 'punct_acs_threshold' where the value indicates
the percentage of ideal channel average interference factor above
which a channel should be punctured. Default is set to 0 which disables
the puncturing for ACS.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoEHT: Process puncturing bitmap from channel switch event
Aloka Dixit [Tue, 14 Mar 2023 04:59:22 +0000 (21:59 -0700)] 
EHT: Process puncturing bitmap from channel switch event

Retrieve the puncturing bitmap sent by the driver in channel switch
events and add a new member punct_bitmap in struct ch_switch to store
it.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agonl80211: Send EHT puncturing bitmap to the driver for switch command
Aloka Dixit [Tue, 14 Mar 2023 04:59:21 +0000 (21:59 -0700)] 
nl80211: Send EHT puncturing bitmap to the driver for switch command

Propagate puncturing bitmap from the channel switch command to the driver.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoEHT: Configure puncturing bitmap during channel switch
Aloka Dixit [Tue, 14 Mar 2023 04:59:20 +0000 (21:59 -0700)] 
EHT: Configure puncturing bitmap during channel switch

Parse, validate, and configure puncturing bitmap if provided in the
channel switch command.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoEHT: Send puncturing bitmap to the driver for AP bring up
Aloka Dixit [Tue, 14 Mar 2023 04:59:19 +0000 (21:59 -0700)] 
EHT: Send puncturing bitmap to the driver for AP bring up

Send the user configured puncturing bitmap to the driver.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
2 years agoEHT: Add puncturing bitmap to EHT Operation element
Muna Sinada [Tue, 14 Mar 2023 04:59:18 +0000 (21:59 -0700)] 
EHT: Add puncturing bitmap to EHT Operation element

Add preamble puncturing bitmap to the EHT Operation element as per IEEE
P802.11be/D3.0, Figure 9-1002c (EHT Operation Information field format).
Bits set to 1 indicate that the subchannel is punctured, otherwise
active.

Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Signed-off-by: Balamurugan Mahalingam <quic_bmahalin@quicinc.com>
2 years agoEHT: Downgrade bandwidths for VHT and HE when using puncturing
Aloka Dixit [Tue, 14 Mar 2023 04:59:17 +0000 (21:59 -0700)] 
EHT: Downgrade bandwidths for VHT and HE when using puncturing

Legacy modes (VHT, HE) should advertise downgraded bandwidth if
RU puncturing is enabled in EHT mode. This is required for the legacy
stations which cannot parse the EHT Operation elements hence do not
support EHT RU puncturing.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Signed-off-by: Ramanathan Choodamani <quic_rchoodam@quicinc.com>
2 years agoEHT: Validate puncturing bitmap
Aloka Dixit [Tue, 14 Mar 2023 04:59:16 +0000 (21:59 -0700)] 
EHT: Validate puncturing bitmap

Validate preamble puncturing bitmap.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoEHT: Add configuration option for puncturing in AP mode
Muna Sinada [Tue, 14 Mar 2023 04:59:15 +0000 (21:59 -0700)] 
EHT: Add configuration option for puncturing in AP mode

Add a new option to configure the disabled subchannel bitmap as per
IEEE P802.11be/D3.0, Figure 9-1002c (EHT Operation Information
field format).

Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agonl80211: Retrieve driver support for EHT puncturing
Aloka Dixit [Tue, 14 Mar 2023 04:59:14 +0000 (21:59 -0700)] 
nl80211: Retrieve driver support for EHT puncturing

Retrieve the driver support for preamble puncturing.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
2 years agoSync with wireless-next.git include/uapi/linux/nl80211.h
Jouni Malinen [Wed, 15 Mar 2023 09:44:08 +0000 (11:44 +0200)] 
Sync with wireless-next.git include/uapi/linux/nl80211.h

This brings in nl80211 definitions as of 2023-03-07.

Signed-off-by: Jouni Malinen <j@w1.fi>
2 years agoFILS: 320 MHz support in FD frame
Aloka Dixit [Mon, 13 Mar 2023 09:11:27 +0000 (02:11 -0700)] 
FILS: 320 MHz support in FD frame

Indicate 320 MHz channel width in FILS discovery frame if applicable.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoFILS: Fix maximum NSS calculation for FD frame
Aloka Dixit [Mon, 13 Mar 2023 09:11:25 +0000 (02:11 -0700)] 
FILS: Fix maximum NSS calculation for FD frame

Maximum NSS calculation assumed the host to be little endian while
retrieving MCS values from HE capabilities which is incorrect. Use
WPA_GET_LE16() instead.

Add a check for HE as the current NSS calculation assumes HE support.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoFILS: Make HE a requirement for FILS discovery
Aloka Dixit [Mon, 13 Mar 2023 09:11:23 +0000 (02:11 -0700)] 
FILS: Make HE a requirement for FILS discovery

FILS discovery frame generation currently assumes HE support for
calculating the number of spatial streams. Add a check to reject
the configuration if the feature is enabled without enabling HE.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2 years agoAP: Fix 6 GHz AP setup after disable-enable
Pooventhiran G [Thu, 23 Feb 2023 16:43:50 +0000 (22:13 +0530)] 
AP: Fix 6 GHz AP setup after disable-enable

Once ACS picks a channel, iface->freq and iface->conf->channel are
updated. So, AP comes up in the last operating channel when 'ENABLED'
after 'DISABLED' though ACS is configured.

But this will fail for 6 GHz APs since configured_fixed_chan_to_freq()
checks if iface->conf->channel is filled or not irrespective of ACS
configuration, and the checks inside configured_fixed_chan_to_freq()
fail the AP setup. Fix this by clearing iface->freq and
iface->conf->channel in AP setup for ACS configuration.

Fixes: bb781c763f47 ("AP: Populate iface->freq before starting AP")
Signed-off-by: Pooventhiran G <quic_pooventh@quicinc.com>
2 years agoml80211: Put wiphy idx to obtain correct country code
Chenming Huang [Wed, 8 Mar 2023 07:39:22 +0000 (15:39 +0800)] 
ml80211: Put wiphy idx to obtain correct country code

If wiphy idx not provided, kernel returns global reg domain when
processing NL80211_CMD_GET_REG. To obtain the correct country code for
the self-managed regulatory cases, put wiphy idx into nl_msg when
sending this command to kernel.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2 years agoDefine QCA vendor per-enum 64-bit pad attributes
Jeff Johnson [Thu, 23 Feb 2023 01:13:24 +0000 (17:13 -0800)] 
Define QCA vendor per-enum 64-bit pad attributes

When writing 64-bit attributes into the netlink buffer, senders may
add a padding attribute to allow the payload of the 64-bit attribute
to be 64-bit aligned. For QCA vendor attributes, currently the
attribute QCA_WLAN_VENDOR_ATTR_PAD in enum qca_wlan_vendor_attr is
defined for this purpose.

Unfortunately, when adding attributes to the netlink buffer, all
attributes at a given level of nesting must be defined in the same
enum so that they can be unambiguously parsed. This means that
QCA_WLAN_VENDOR_ATTR_PAD can only be used to pad 64-bit attributes
defined in enum qca_wlan_vendor_attr.

There are many other QCA vendor enums which define 64-bit attributes,
so add a pad attribute to all of them so that the 64-bit attributes
can be unambiguously padded.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
2 years agoqca-vendor: Add QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NF_CAL_VAL
Jingxiang Ge [Wed, 8 Mar 2023 04:27:10 +0000 (20:27 -0800)] 
qca-vendor: Add QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NF_CAL_VAL

Add QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NF_CAL_VAL attribute
for noise floor calibration value.

Signed-off-by: Jingxiang Ge <quic_jge@quicinc.com>
2 years agoAdd QCA vendor commands to set and get MLO links state information
Shivani Baranwal [Tue, 31 Jan 2023 05:11:33 +0000 (10:41 +0530)] 
Add QCA vendor commands to set and get MLO links state information

Add a new vendor command and attributes to control and fetch the state
information of the MLO links affiliated with a specific interface.

This will enable user space to dynamically control the MLO links states
based on the latency, throughput and power save requirements.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
2 years agomesh: Add EHT support
Sathishkumar Muruganandam [Fri, 3 Mar 2023 05:47:57 +0000 (11:17 +0530)] 
mesh: Add EHT support

Add mesh_eht_enabled and eht ssid configuration parameters to include
EHT Capability and EHT Operation elements in mesh PLINK Action frames.

Update mesh_eht_enabled from EHT capability advertised for mesh mode.

Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
2 years agowlantest: Adjust kdk_len according to RSNX capability
Adil Saeed Musthafa [Wed, 1 Mar 2023 19:21:38 +0000 (11:21 -0800)] 
wlantest: Adjust kdk_len according to RSNX capability

This is needed to derive the PTK correct when Secure LTF support is used
and the additional KDK component needs to be taken into account.

Signed-off-by: Adil Saeed Musthafa <quic_adilm@quicinc.com>