Make this easier to understand by using the appropriately named function
to parse KDEs/IEs in the Key Data field of EAPOL-Key frames instead of
using the wrapper function that is there just to provide the old
function name for wpa_supplicant.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
rx_mgmt_beacon() was skipping all steps after a Probe Response frame
from the AP had been processed. This is expected for the parts that were
updating the bss entry information, but the checks for beacon protection
should not be skipped in this manner.
Skip onlu the updating parts while checking that beacon protection is
used correctly to make this more useful.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Add a new vendor sub-command to implement Spatial Reuse feature.
Userspace enables SR feature with specific configuration parameters. The
driver/firmware upon receiving the command, enables the SR feature if it
is supported by the currently connected AP. The driver may reject the
command if it cannot enable the SR with the configured parameters. The
driver sends events to userspace to indicate when SR feature is enabled
or disabled internally. Userspace can also query SR feature related
parameters and statistics from the driver/firmware as needed.
Signed-off-by: Rachit Kankane <quic_rkankane@quicinc.com>
Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
Fix the following compiler error:
qca-vendor.h:5892:54: error: result of ‘1 << 31’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=]
5892 | QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HE40INTOL = 1 << 31,
This "1" needs to be marked unsigned for this case of MSB=1.
Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
Compiler throws a warning for using bitwise operation in
wpa_s_setup_sae_pt() function instead of logical AND operation on two
boolean values.
Fixes: e81ec0962d ("SAE: Use H2E unconditionally with the new AKM suites")
Signed-off-by: Sunil Ravi <sunilravi@google.com>
IEEE Std 802.11-2020, 11.8.8 (Selecting and advertising a new channel)
doesn't restrict switching to a channel which is not in the same band as
the current band. But at the same time, there are some issues in
switching between the 2.4/5 GHz bands and the 6 GHz band. So limit the
check to consider the critical use case of switching from a 5 GHz channel
to a 2.4 GHz channel.
Signed-off-by: Sunil Ravi <sunilravi@google.com>
hostapd based automatic channel selection doesn't update the hardware
mode after the channel is selected. This change specifically helps
channel 14 which can operate only in IEEE 802.11b mode.
Signed-off-by: Sunil Ravi <sunilravi@google.com>
While setting up the P2P GO interface, wpa_supplicant sets the operating
channel width to CHANWIDTH_USE_HT in cases where it fails to set 80 MHz
bandwidth. In the same flow, update the operating class, too, according
to the channel width. This is to avoid setting up the operational
channel width back to 80 MHz from hostapd interface setup.
Signed-off-by: Sunil <sunilravi@google.com>
wpas_p2p_optimize_listen_channel() checks for the state and current ssid
of the interface calling this function. This check prevents the function
from setting the optimized listen channel. Since the listen channel is
stored in global P2P configuration data, do not check the state and
current interface of the caller.
Signed-off-by: Sunil Ravi <sunilravi@google.com>
bss->conf->bssid may be kept unset and will cause an empty BSSID field
in RNR. Fix this to use own_addr instead.
Signed-off-by: Shay Bar <shay.bar@celeno.com>
Signed-off-by: moran.daori <moran.daori@celeno.com>
If wpa_supplicant was build without CONFIG_IEEE80211R, the
exposed key-management capabilities should not include one of the
FT protocols. If someone would use a FT protocol in such situation,
it would fail anyway.
Signed-off-by: Clemens Famulla-Conrad <cfamullaconrad@suse.de>
It is possible to specify -t or -K multiple times. With this the
value isn't boolean anymore and we hit a assert in libdbus
function `dbus_message_iter_append_basic()`, which expect 0 or 1
for DBUS_TYPE_BOOLEAN.
Signed-off-by: Clemens Famulla-Conrad <cfamullaconrad@suse.de>
The ACS info messages frequently appear for multiple channels. Without
the actual frequency in the messages, they are not very informative.
Add the frequency to them to improve this.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Since the kernel actually passes the command-line parameters
as environment variables to the init script, there's no need
to parse them out of /proc/cmdline.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
It can be useful to configure a different module directory, so you don't
need to install the kernel modules in the host /lib/modules/ location.
Allow configuring it in the config file.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
If cfg80211 is built into the kernel, then it may/will have
loaded the regdb before we mount our own /lib/firmware. This
may result in using the wrong regulatory data. Fix this by
using iw to reload the regdb after mounting it.
Fixes: a29c2399a7 ("tests: Add regulatory database to VMs")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Don't select channels designated for exclusive indoor use when the
country string is set for outdoor operation (country3=0x4f, i.e., the
third character of the country string is 'O').
Signed-off-by: David Bauer <mail@david-bauer.net>
Add a new attribute QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_SP_START_OFFSET to
configure offset to shift start of the service period. This attribute
will be used when device supports flexible TWT. If provided, this
attribute will override QCA_WLAN_VENDOR_ATTR_TWT_NUDGE_WAKE_TIME.
Signed-off-by: nakul kachhwaha <quic_nkachhwa@quicinc.com>
Parse link id info from channel switch events and indicate the info to
control interface using new per link channel switch events. If channel
switch happens on the link which used during association both legacy
and new per-link channel switch events will be reported.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Add support to fetch and indicate per-link MLO signal poll information
via a new control interface command MLO_SIGNAL_POLL.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Add bssid as parameter to nl80211_get_link_signal() instead of using
bssid from driver structure. This is useful for calling the function
per-MLO link.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Append the AP MLD address to CTRL-EVENT-CONNECTED when the current
connection uses MLO.
Signed-off-by: Aleti Nageshwar Reddy <quic_anageshw@quicinc.com>
Parse Multi-Link element received in scan result to get AP MLD address
and cache it in the wpa_bss structure.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Add a utility function to fetch Multi-Link Device (MLD) address from a
Basic Multi-Link element.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Add a helper function to get Multi-Link element of a specified type from
scan result Probe Response frame or Beacon frame elements.
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
Use AP MLD address as the peer's MAC address to set supplicant port as
authorized for MLO connection.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Add support to fetch MLO connection info from the driver to the
wpa_supplicant instance of corresponding MLD STA interface. In addition,
return true for BSSs associated with MLO links from wpa_bss_in_use() to
avoid getting them cleared from scan results.
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>
Parse NL80211_ATTR_MLO_LINKS in NL80211_CMD_CONNECT event and cache the
MLO connection information. Set the legacy connection fields such as
assoc_freq and bssid to the values of the MLO link on which association
happened.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Define the following fields described in IEEE P802.11be/D2.1:
- Multi-Link element types as defined in Table 9-401c (Type subfield
encoding)
- Basic Multi-Link element presence bitmap as defined in Figure
9-1002g (Presence Bitmap subfield of the Basic Multi-Link element
format)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
P2P connections in the 6 GHz band should be limited to preferred
scanning channels since AP/GO discovery cannot depend on 2.4/5 GHz
discovery.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Support updating the RRM IEs to the driver for Probe Response and
(Re)Association response frames in the AP mode when the SME is
implemented in the driver.
Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
Previously, wpa_supplicant was using the current SSID for building the
SAE authentication commit frame for retries during external
authentication. But the external authentication SSID can be different
from the current SSID. Fix this by using the correct SSID profile.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
The driver's SME may choose a BSS of a different ESS (SSID) compared to
the current SSID and trigger external authentication. If the chosen SSID
is not associated/selected before by wpa_supplicant it won't have the
H2E PT derived. Make sure to derive PT for SSID indicated in the
external authentication request.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Set TWT responder configurator in the driver parameters only when the AP
is configured with HE enabled. This was already done for the extended
capability bit generation in commit 8de0ff0fa1 ("HE: Add TWT responder
extended capabilities field"), but this parameter for the driver command
to start the AP in _ieee802_11_set_beacon() missed the condition.
Move the ieee80211ax check into the common helper function to cover both
cases. In addition, add a check for disable_11ax to cover the case where
HE is disabled for a specific BSS.
Fixes: ab8c55358e ("HE: Dynamically turn on TWT responder support")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Commit e3bd6e9dc0 ("P2P: Use another interface operating channel as
listen channel") allows P2P listen channel to be selected based on
another interface operating channel if it is one of social channels
(i.e., 2.4 GHz 1, 6, 11).
This optimization is disabled by default due to the technical
specification expectations, but since this can be quite helpful for
optimized behavior, enable it by adding p2p_optimize_listen_chan=1 to
the default Android configuration template.
Extend attributes of subcmd QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO
for quering per MCS TX and RX packets from the driver/firmware.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Add a new QCA vendor attribute to configure the periodic sounding for Tx
beamformer functionality.
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>