Commit graph

18664 commits

Author SHA1 Message Date
Veerendranath Jakkam
6002fe87d8 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>
2023-04-19 11:51:43 +03:00
Veerendranath Jakkam
c70405cef6 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>
2023-04-19 11:50:55 +03:00
Xin Deng
f8931fcbaf hostapd: Restore the flow of set beacon and WPA key init
hostapd start AP flow changed in commit 931e5d4f9e. 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: 931e5d4f9e ("mbssid: Configure all BSSes before beacon setup")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2023-04-19 11:47:52 +03:00
Chaoli Zhou
e8912452ed 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>
2023-04-19 11:34:38 +03:00
Veerendranath Jakkam
9932ff30c4 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>
2023-04-19 11:32:07 +03:00
Jouni Malinen
9bad3c975d 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>
2023-04-18 11:40:10 +03:00
Jouni Malinen
07a7bcd7ea 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>
2023-04-18 11:40:10 +03:00
Aloka Dixit
ac54b61273 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>
2023-04-18 11:39:32 +03:00
Aloka Dixit
5d06acefdd 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>
2023-04-18 11:35:06 +03:00
Aloka Dixit
8f1d384197 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>
2023-04-18 11:14:07 +03:00
Jouni Malinen
921f82cf18 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>
2023-04-06 13:03:23 +03:00
Veerendranath Jakkam
302d761a85 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>
2023-04-03 23:09:07 +03:00
Ainy Kumari
44c38af04f 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>
2023-04-03 23:04:13 +03:00
Veerendranath Jakkam
bb4560252d 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>
2023-04-03 23:00:00 +03:00
Seevalamuthu Mariappan
bb945b98fe 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>
2023-03-29 18:37:31 +03:00
Jouni Malinen
0059fa5bae 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: 15742566fd ("6 GHz: Fix operating class in Supported Operating Classes element")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2023-03-29 18:25:37 +03:00
Anilkumar Kolli
744295c8bc 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>
2023-03-29 18:22:55 +03:00
Hari Chandrakanthan
5349a45d32 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>
2023-03-29 18:09:06 +03:00
Sai Pratyusha Magam
a4af796248 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
13f6f617ee ("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>
2023-03-28 17:04:21 +03:00
Jouni Malinen
d423baa42a 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 228420e2d9 ("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>
2023-03-27 17:26:41 +03:00
Jouni Malinen
22c453ae3c tests: Suite B 192-bit RSA with TLS 1.3
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2023-03-23 00:00:10 +02:00
Jouni Malinen
d17fca576c 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>
2023-03-22 23:58:47 +02:00
Ainy Kumari
cf8f13ac85 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>
2023-03-22 16:31:36 +02:00
Aloka Dixit
a0403c0239 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>
2023-03-17 19:49:57 +02:00
Aloka Dixit
af0f60e7dd 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>
2023-03-17 19:49:57 +02:00
Aloka Dixit
f3206fbe94 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>
2023-03-17 19:49:57 +02:00
Aloka Dixit
e3621867c5 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>
2023-03-17 19:49:57 +02:00
Aloka Dixit
e277e577c8 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>
2023-03-17 19:49:57 +02:00
Aloka Dixit
29a882bed3 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>
2023-03-17 19:49:54 +02:00
Aloka Dixit
4942b19fff 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>
2023-03-17 19:46:24 +02:00
Muna Sinada
f9fc2eabbd 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>
2023-03-17 19:46:24 +02:00
Aloka Dixit
46a5d989d4 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>
2023-03-17 19:46:24 +02:00
Aloka Dixit
7618269ec6 EHT: Validate puncturing bitmap
Validate preamble puncturing bitmap.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
2023-03-17 18:54:50 +02:00
Muna Sinada
9102fda31f 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>
2023-03-17 11:06:20 +02:00
Aloka Dixit
9e79439fcb 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>
2023-03-15 22:07:29 +02:00
Jouni Malinen
507be376cd 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>
2023-03-15 11:46:03 +02:00
Aloka Dixit
591256a8c6 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>
2023-03-14 11:27:43 +02:00
Aloka Dixit
903e3a1e62 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>
2023-03-14 11:27:00 +02:00
Aloka Dixit
ecae45ff66 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>
2023-03-14 11:15:06 +02:00
Pooventhiran G
4e86692ff1 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: bb781c763f ("AP: Populate iface->freq before starting AP")
Signed-off-by: Pooventhiran G <quic_pooventh@quicinc.com>
2023-03-09 21:00:43 +02:00
Chenming Huang
a34b8477a7 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>
2023-03-09 20:59:20 +02:00
Jeff Johnson
1491fc64a8 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>
2023-03-09 20:56:20 +02:00
Jingxiang Ge
55e31699e9 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>
2023-03-09 20:43:36 +02:00
Shivani Baranwal
b1f85957c4 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>
2023-03-09 20:43:14 +02:00
Sathishkumar Muruganandam
44b32a7526 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>
2023-03-09 16:19:09 +02:00
Adil Saeed Musthafa
0660f31ba0 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>
2023-03-09 16:08:03 +02:00
Avraham Stern
23ddb3ffee tests: Remove dynamically added hostapd interfaces
When an in interface is added dynamically to hostapd with
HWSimRadio, it's not removed during device reset.
This requires to manually remove it, otherwise subsequent tests may
fail. Better do it during device reset.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2023-03-07 23:55:00 +02:00
Andrei Otcheretianski
fa4d7be5bf tests: Clear sae_groups in eht_sae test
Otherwise subsequent tests may fail.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2023-03-07 23:55:00 +02:00
Ilan Peer
c4cb62ca8e WPA_AUTH: MLO: Add functions to get the AA and SPA
As a preparation to use AP MLD address and non-AP MLD address
in the RSN Authenticator state machine, add utility functions to
get the current AA and SPA.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2023-03-07 23:54:50 +02:00
Ilan Peer
cab963e9f8 AP: Split check_assoc_ies()
As a preparation for processing an association request with
ML element, split the function such that the elements checking
would be separate from parsing.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2023-03-07 23:46:18 +02:00