Commit Graph

17223 Commits (vlan_per_psk)
 

Author SHA1 Message Date
Tom Barthe 48e0ed037b Retrieve and use a per-PSK vlan_description
Signed-off-by: Tom Barthe <jeltz+hostap@auro.re>
3 years ago
Tom Barthe 0b17c48b9b Add default_radius_vlan in sta_info
Used to store the vlan_description corresponding to RADIUS tag 0.

Signed-off-by: Tom Barthe <jeltz+hostap@auro.re>
3 years ago
Tom Barthe a6fc725f4b Fix selection of Tunnel* attributes by tag
The initial implementation was doing useless work.

Signed-off-by: Tom Barthe <jeltz+hostap@auro.re>
3 years ago
Tom Barthe 2ebf3674f5 Add a per PSK vlan_description
Signed-off-by: Tom Barthe <jeltz+hostap@auro.re>
3 years ago
Tom Barthe 12c14a8dd5 Replace some vlan_ids with vlan_descriptions
It should ease the integration of PPSK.

Signed-off-by: Tom Barthe <jeltz+hostap@auro.re>
3 years ago
Tom Barthe 7ac437a745 Support for RADIUS attributes filtering by tag
Signed-off-by: Tom Barthe <jeltz+hostap@auro.re>
3 years ago
Vinay Gannevaram 2b3e64a0fb Update ciphers to address GTK renewal failures while roaming
After roaming from WPA2-AP (group=CCMP) to WPA-AP (group=TKIP) using
driver-based SME and roaming trigger, GTK renewal failures are observed
for the currently associated WPA-AP because of group cipher mismatch,
resulting in deauthentication with the AP.

Update the group cipher and pairwise cipher values in wpa_sm from
association event received from the driver in case of SME offload to the
driver to address GTK renewal failures (and similar issues) that could
happen when the driver/firmware roams between APs with different
security profiles.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen 19307ef69a tests: WPA2/WPA-PSK cfg80211 connect command to trigger roam
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Sunil Dutt 9cf4bb0ef0 Vendor command to configure/trigger the roam events
Introduce a new vendor command QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS
that aims to configure/trigger the roam events from the driver.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Gaurav Sharma dd3a2960aa Add TWT vendor attribute to configure announce timeout value
Add QCA_WLAN_VENDOR_ATTR_TWT_SETUP_ANNOUNCE_TIMEOUT attribute to
configure announce timeout value for announce TWT session.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen afa0b9b6c5 P2P: Make p2p_check_pref_chan_no_recv() easier for static analyzers
Add an explicit check for msg->channel_list != NULL instead of depending
on msg->channel_list_len > 0 implying that. This is to silence invalid
static analyzer reports.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen 857c4dfa83 Make get_mode() easier for static analyzers
Add an explicit check for modes != NULL instead of depending on
num_modes > 0 implying that. This is to silence invalid static analyzer
reports.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Jouni Malinen 9e46b31273 tests: wpa_supplicant AP mode and vendor elements
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Chaoli Zhou 9651deba52 Support vendor element configuration for AP mode from wpa_supplicant
Support adding/deleting vendor elements dynamically for AP mode while it
is started by wpa_supplicant instead of hostapd which already supported
this. This adds ap_assocresp_elements global parameter and UPDATE_BEACON
control interface command to take the changed values into effect.

Usage in wpa_cli:
Add vendor IE for (Re)Association Response frames
> set ap_assocresp_elements=xxxx
Add vendor IE for Beacon/Probe Response frames
> set ap_vendor_elements=xxxx

Delete vendor IE from (Re)Association Response frames
> set ap_assocresp_elements
Delete vendor IE from Beacon/Probe Response frames
> set ap_vendor_elements

To make vendor IE changes take effect
> update_beacon

Signed-off-by: Chaoli Zhou <zchaoli@codeaurora.org>
3 years ago
Jouni Malinen 7dc0e9cf47 tests: Extend DSCP testing coverage
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Shivani Baranwal 2b4b1742ea tests: DSCP policy
Signed-off-by: Shivani Baranwal <shivbara@codeaurora.org>
3 years ago
Veerendranath Jakkam d144b7f34c DSCP: Add support to send DSCP Policy Query frame
Add support to send DSCP Policy Query frame using a new control
interface command DSCP_QUERY. This includes support for a wildcard DSCP
query and a DSCP query with a single Domain Name attribute.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
3 years ago
Veerendranath Jakkam c903257fb1 DSCP: Parse WFA Capabilities element in (Re)Association Response frame
Add support to parse WFA Capabilities element from the (Re)Association
Response frame. Also register a timeout for the station to wait before
sending a new DSCP query if requested by AP.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
3 years ago
Veerendranath Jakkam a4aae9f9b8 DSCP: Indicate DSCP Policy support in (Re)Association Request frame
Indicate DSCP Policy capability by including a WFA Capabilities element
containing the relevant bit set to 1 in the (Re)Association Request
frames when enabled by user.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
3 years ago
Veerendranath Jakkam d57456c1ff DSCP: Allow DSCP Policy Response Action frame to be sent
Add support to prepare and send DSCP response action frame to the
connected AP in response to a new control interface command DSCP_RESP.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
3 years ago
Veerendranath Jakkam 2033e318e6 DSCP: Parsing and processing of DSCP Policy Request frames
Add support to parse received DSCP Policy Request frames and send the
request details as control interface events.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
3 years ago
Veerendranath Jakkam fe2a44485e DSCP: DSCP policy capability configuration
The DSCP policy capability is disabled by default. The user frameworks
which have support for handling DSCP policy request messages need to
enable this capability explicitly to allow wpa_supplicant to advertise
the capability to the AP and allow the related frames to be processed.

Signed-off-by: Veerendranath Jakkam <vjakkam@codeaurora.org>
3 years ago
Jouni Malinen 8471d940e3 Move pmf_in_use() into a more generic file
This function is not specific to GAS, so make it available throughout
wpa_supplicant without requiring CONFIG_GAS.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Hu Wang 41ec97cd09 HE: Use a random BSS Color if not defined in the config file
Commit 0cb39f4fd5 ("HE: Extend BSS color support") sets the BSS Color
default value to 1 as "Interoperability testing showed that stations
will require a BSS color to be set even if the feature is disabled."

A new interop issue was observed with hardcoded BSS color value of 1:
- REF device using one interface (e.g., wlan0) to connect to an HE
  AP, whose BSS color is enabled and value is 1.
- REF device using another interface (e.g., p2p0) to connect to a
  P2P GO using BSS color default settings.
  (i.e., BSS color disabled and value is 1).
- REF device checks both AP's and P2P GO's BSS Color values even though
  GO's BSS color is disabled. This causes collision of the BSS
  color somehow causing RX problems.

For DUT as a P2P GO, its firmware uses default BSS color value 1 from
wpa_supplicant, then triggers a timer (e.g., 120 s) to update its BSS
color values based on its neighboring BSSes. To reduce the likelihood of
BSS color collision with REF device before that, use a random BSS Color
if not defined in the config file.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Sunil Dutt 1518638b70 QCA vendor command to configure the parameters for monitor mode
This new vendor command aims to indicate the driver to enable the
monitor mode for an interface on which this command is issued. Once
enabled, the frames (both TX and RX) on this interface are sent to an
active coexisting monitor interface.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Vikram Kandukuri 8f7b2c898d Add attributes to support MBSSID multi groups notifications
Add new attributes for supporting MBSSID multi groups notifications
to qca_wlan_vendor_attr_mbssid_tx_vdev_status
(QCA_NL80211_VENDOR_SUBCMD_MBSSID_TX_VDEV_STATUS).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Aleti Nageshwar Reddy a75fdcdcd1 Extend the roam reason codes in QCA vendor attribute
Add new reason codes to the existing enum qca_roam_reason.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Aleti Nageshwar Reddy 9ff0c8af5c Correct the documentation in enum qca_roam_reason
QCA_ROAM_REASON_USER_TRIGGER was wrongly documented as
QCA_ROAM_REASON_EXPLICIT_REQUEST, so correct it.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Hu Wang ce267f4da9 P2P: DFS offload for the autonomous GO
Enhance the P2P_GROUP_ADD command to support DFS channel with 80 and 160
MHz bandwidth to be used for autonomous GO when using offloaded DFS.

For example, 'P2P_GROUP_ADD freq=5500 max_oper_chwidth=80 ht40 vht'

- Previous behavior: AP fallback to channel 100 using 20 MHz with
  "No VHT higher bandwidth support for the selected channel 100"
- Enhanced behavior: AP starts on channel 100 using 80 MHz with
  "VHT center channel 106 for 80 or 80+80 MHz bandwidth"

This functionality is on top of the driver's capability to offload DFS,
which is advertized through WPA_DRIVER_FLAGS_DFS_OFFLOAD.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Vamsi Krishna 6ba665c5c3 Reserve QCA vendor sub command id 201
This is reserved for QCA use.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Aleti Nageshwar Reddy 51d73d9914 Add QCA vendor interface to configure background scan parameters
Add QCA vendor interface support for configuring background scan related
parameters to the driver/firmware.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Ben Wang 61c0757618 EDMG: Validate pri channel lookup result before using it
At least in theory, hw_get_channel_freq() could return NULL, so add
error handling for that.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Hu Wang a95144cf34 Add frequency to operating class determination for 5 GHz channel 144
Commit 45c3e72952 ("Add frequency to operating class determination
for 5 GHz 100..140") extends ieee80211_freq_to_channel_ext() with
knowledge of the operating classes for the 5 GHz channels 100..140.

Per "Table E-4 - Global operating classes" in IEEE Std 802.11-2020, 5
GHz channel 144 also maps to same operating classes, so update hostapd
code to reflect the change.

This issue is found when OCV enabled and 4-way-handshake failed due
to client OCI includes op_class 0 for channel 144. This showed
up in following manner in the debug log:

WPA: OCI KDE in EAPOL-Key - hexdump(len=9): dd 07 00 0f ac 0d 00 90 00
Error interpreting OCI: unrecognized opclass/channel pair (0/144)

Signed-off-by: Hu Wang <huw@codeaurora.org>
3 years ago
Sreeramya Soratkal e5173e8b12 P2P: Enable multiple channel widths for P2P in 6 GHz band
Enable support for P2P connection in 6 GHz with the channel width of 40
MHz, 80 MHz, and 160 MHz. The flag max_oper_chwidth is used to configure
the maximum channel width for P2P connection in 6 GHz with the commands
P2P_CONNECT, P2P_INVITE, and P2P_GROUP_ADD.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
3 years ago
Sreeramya Soratkal f725254cc1 P2P: Enhance determination of secondary offset to support 6 GHz channels
Current definition of wpas_p2p_get_ht40_mode() determines secondary
offset in the 5 GHz band. Enhance the functionality of this function to
determine offset to support 6 GHz channels also.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
3 years ago
Sreeramya Soratkal 575a8e6ca3 P2P: Clone 6 GHz related parameters to new group interface config
Clone pmf and p2p_6ghz_disable configuration values when creating a new
P2P group interface. PMF is required in 6 GHz band operation.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
3 years ago
Nirav Shah f184337605 Add TWT attribute to send Responder PM Mode value to userspace
Add QCA_WLAN_VENDOR_ATTR_TWT_SETUP_RESPONDER_PM_MODE
TWT attribute to send Responder PM Mode value to userspace.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Yu Ouyang 11a3427757 Add time slice duty cycle attribute into QCA vendor command
Add a new attribute into qca_wlan_vendor_attr_ll_stats_results to
support getting interface time slicing duty cycle info.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Aditya Kodukula d408e3d19a Update QCA mDNS Offload vendor command
Update kernel documentation of mDNS offload vendor command.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
David Bauer 2341585c34 ACS: Fix channel 100 frequency
Channel 100 is a valid channel to choose for 80 MHz operation. However,
it was converted to 5500 MHz, not 5550 MHz, for the 80 MHz case while
the conversion to other bandwidths was done correctly. In fact, there is
no channel assigned to this frequency 5550 MHz.

Fix this obvious typo to allow ACS to select channel 100 for 80 MHz
operation again.

Fixes: bef5eee4f7 ("Convert channel to frequency based selection for AP mode ACS")
Signed-off-by: David Bauer <mail@david-bauer.net>
3 years ago
Cedric Izoard ed369613f4 P2P: Align p2p_buf_add_pref_channel_list() prototype with definition
Align the p2p_buf_add_pref_channel_list() prototype and definition in
p2p_build.c and p2p_i.h. Use unsigned int over u32 as it is actully
called with an unsigned int parameter.

This removes compilation warning on platform where u32 != unsigned int.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years ago
Cedric Izoard 75a6d44a4a hostapd: Allow HT40 on 5 GHz channels 173 and 177
IEEE Std 802.11ax-2021 added channel 177 into global operating class 125
and consequently channel 173 in global operating class 126 (HT40+) and
channel 177 in global operating class 127 (HT40-).

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years ago
Cedric Izoard 7dd2e23696 hostapd: Always allow HE AP with a 20 MHz channel width
Skip the test of HE PHY capability bit "Support for a 40 MHz and 80 MHz
channel width" when starting an AP with a 20 MHz channel on the 5 GHz
band.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
3 years ago
Sreeramya Soratkal 9f2217c513 P2P: Consider p2p_no_go_freq for GO preferred frequency
Currently while selecting a preferred frequency when no preference is
known, p2p_no_go_freq is not considered for 5 GHz and 60 GHz channels.
This results in starting GO on the channels that are configured not to
allow the local device as GO.

Use wpas_p2p_supported_freq_go api to check if the p2p_no_go_freq
configuration before selecting the preferred frequency for GO.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
3 years ago
Sreeramya Soratkal 882c53be50 P2P: Avoid integer overflow in channel
For some 6 GHz operating class like 134, there is a possibility where
the ch variable used for channel iterator overflows when it is
incremented. Fix this by updating the datatype of ch variable to
avoid integer overflow while incrementing.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
3 years ago
Vinita S. Maloo a58f7e61c1 Add QCA vendor interface to configure allowed bands for roaming
Add a QCA vendor attribute to configure the driver/firmware the allowed
bands for roaming by userpace. This attribute is also used to get the
configured roam bands from the driver.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
3 years ago
Mathew Hodson be81bbdc3b doc: Fix grammar in wpa_supplicant overview
Signed-off-by: Mathew Hodson <mathew.hodson@gmail.com>
3 years ago
Johannes Berg fde38cac8a tests: test_fst_config: Convert FstLauncher to context manager
Using __del__ for any kind of cleanup is not a good idea
as it's not guaranteed to be called at any particular time,
it's only called whenever the next garbage collect cycle
kicks in.

Use a context manager instead, which basically removes the
need for the try/finally and fixes the reliance on __del__.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years ago
Johannes Berg c8e2fc1fd5 tests: fst_test_common: Remove dead code from HapdRegCtrl
Since refcnt is never incremented, this is dead code, just remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years ago
Cy Schubert 362d9a49d4 utils: FreeBSD supports fdatasync(2)
FreeBSD supports fdatasync(2). Enable it in os_unix.c.

Signed-off-by: Cy Schubert <cy@FreeBSD.org>
3 years ago