Commit graph

968 commits

Author SHA1 Message Date
Sylvio Alves
330a8e19f1 drivers: wifi: esp32: use generic wifi_sta_auto_dhcpv4 option
Drop the Espressif-specific ESP32_WIFI_STA_AUTO_DHCPV4 Kconfig and
switch the driver to the generic WIFI_STA_AUTO_DHCPV4 option added
in the Wi-Fi L2 layer. The new option provides the same behavior
across all in-tree Wi-Fi drivers, allowing applications to control
automatic DHCPv4 start uniformly regardless of the underlying SoC.

A migration note is added so applications that previously disabled
the vendor option know to disable the generic one instead.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-20 14:13:17 +02:00
Fin Maaß
4d859419d9 drivers: serial: don't check return value of uart_irq_update()
Remove return value checks of uart_irq_update().
Needed for changing it's return value to void.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-19 17:46:51 -04:00
Maochen Wang
22490ce085 drivers: wifi: infineon: Use WIFI_STA_AUTO_DHCPV4 config option
Update Infineon AIROC Wi-Fi driver to use the new WIFI_STA_AUTO_DHCPV4
config option instead of directly checking CONFIG_NET_DHCPV4 when
deciding whether to automatically restart the DHCPv4 client after STA
connection is established.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2026-05-19 09:43:57 +02:00
Maochen Wang
62a8a9b35b drivers: wifi: nxp: Use WIFI_STA_AUTO_DHCPV4 config option
Update NXP Wi-Fi driver to use the new WIFI_STA_AUTO_DHCPV4 config
option instead of directly checking CONFIG_NET_DHCPV4.
This allows the driver to respect the application's preference for
automatic DHCPv4 startup behavior, while still supporting the DHCPv4
functionality when enabled in the network stack.
The driver now only manages the DHCP timer and automatic DHCP client
startup when CONFIG_WIFI_STA_AUTO_DHCPV4 is enabled. When disabled,
the DHCPv4 client can still be used if CONFIG_NET_DHCPV4 is enabled,
but must be manually controlled by the application layer.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2026-05-19 09:43:57 +02:00
Shan Pen
dd7aa5e3da drivers: wifi: infineon: add missing logging header
Include zephyr/logging/log.h in the AIROC WHD HAL files that use
LOG_MODULE_DECLARE() and LOG_ERR().

This fixes builds of samples/net/wifi/shell for
cy8cproto_062_4343w/cy8c624abzi_s2d44.

Fixes #109151

Signed-off-by: Shan Pen <bricle031@gmail.com>
2026-05-18 15:24:18 +01:00
Sylvio Alves
5cce452d7f drivers: wifi: esp32: fix PMF and WPA auto-personal handling
Set pmf_cfg.capable for WPA2-PSK so the station advertises PMF
capability, which transition-mode APs require to associate.

Add WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL handling. STA path uses
WPA2-PSK threshold with PMF capable so it can still associate to
WPA2-only and transition APs. AP path advertises WPA2/WPA3 mixed
mode, guarded by CONFIG_ESP32_WIFI_SOFTAP_SAE_SUPPORT.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-15 12:35:47 -05:00
Maochen Wang
36c747a93b drivers: wifi: nxp: move net port layer out of HAL
The original net.c in hal_nxp contains Zephyr-specific code, which
violates the rule that HAL 'Zephyr modules should not contain code that
is written exclusively for Zephyr'.
Move the network porting layer and Zephyr relocation related CMakelist
change into drivers/wifi/nxp to align with Zephyr architecture.
Also fix build issues and switch to Zephyr-defined configurations.
Add nxp_net_if_get_device() wrapper API.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2026-05-14 15:14:32 +02:00
Kapil Bhatt
f53d66d06a drivers: nrf_wifi: Add kconfig to abort display scan depends on BSS limit
Add Kconfig to abort the display scan when the BSS limit is reached.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-05-14 15:13:53 +02:00
Chaitanya Tata
a2c4324acd drivers: wifi: nrf_wifi: Validate PS event TWT flow count and length
Reject malformed nrf_wifi_umac_event_power_save_info payloads before
copying TWT entries into struct wifi_ps_config. The handler previously
trusted num_twt_flows and indexed twt_flow_info[] without checking
WIFI_MAX_TWT_FLOWS or event_len, which could overflow the fixed Zephyr
twt_flows buffer and read past the event buffer.

Fix issue #108848.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
2026-05-13 10:41:30 +02:00
Sylvio Alves
fd95968be0 drivers: wifi: esp32: align iface state with dormant flag
Switch interface gating from carrier on/off to the dormant flag,
matching nrf_wifi/nxp/airoc/esp_at/esp_hosted. Carrier is set
once at init; dormant toggles per association on STA and per
AP_START/AP_STOP on AP. This preserves IP and IPv6 link-local
state across transient drops instead of tearing them down.

Allow AP TX in AP_STARTED and AP_DISCONNECTED (no clients yet,
or last client left) in addition to AP_CONNECTED, so broadcast
traffic is not rejected with -EIO.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-05-12 17:14:40 +02:00
Fabio Baltieri
99db9625f9 drivers: wifi: airoc: add missing header
Add a missing log.h error, fixes a build error:

airoc_whd_hal_common.c:14:40: error: expected ')' before numeric

constant airoc_whd_hal_common.c:32:17: error: implicit declaration of
function

Tested with: west build -p -b rpi_pico/rp2040/w samples/net/wifi/shell

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-05-11 04:05:13 +02:00
Fengming Ye
ce012d07a0 drivers: wifi: nxp: fix build errors caused by eth api update
Fix build errors caused by eth api update.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2026-05-08 11:22:47 +02:00
Fengming Ye
3c0fe6a829 drivers: wifi: nxp: add promisc mode capability
Add promisc mode capability for bridge.
There's no filtering really so enabling promisc is a noop but
pretending to have support is needed to allow these
to be added to a bridge.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2026-05-08 08:05:24 +02:00
Fin Maaß
a76f06a9fa drivers: wifi: esp32: implement 2 ifaces on one dev
implement 2 ifaces on one device in the
esp32 wifi driver.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-04 14:55:03 +02:00
Fin Maaß
1bb2215a45 net: wifi: also add struct net_if to struct wifi_mgmt_ops
as the ethernet api already includes
struct net_if as a argument for its
functions also add it to struct wifi_mgmt_ops.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-04 14:55:03 +02:00
Fin Maaß
db984ee196 net: l2: ethernet: add struct net_if to arguments
add struct net_if to arguments

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-04 14:55:03 +02:00
Fabio Baltieri
e040d9836c drivers: wifi: airoc: fix WPA3 support
WPA3 (aka SAE) uses different fields for password and password length,
pass the proper ones to whd_wifi_join depending on usr_result.security.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-05-01 16:21:33 -05:00
Sylvio Alves
49e425df45 drivers: wifi: esp32: select required ecc psa symbols
The supplicant's mbedTLS crypto backend always compiles
crypto_mbedtls-ec.c when ESP32_WIFI_MBEDTLS_CRYPTO is enabled, so
the ECC PSA primitives it references are required regardless of
WPA3-SAE. Building with only ESP32_WIFI_MBEDTLS_CRYPTO=y previously
emitted PSA warnings because the ECC selects lived solely under
ESP32_WIFI_ENABLE_WPA3_SAE.

Move the always-needed ECC selects (ECDH, ECDSA, SECP_R1_256,
KEY_PAIR_BASIC, KEY_PAIR_IMPORT, PUBLIC_KEY) onto
ESP32_WIFI_MBEDTLS_CRYPTO. Keep KEY_PAIR_GENERATE and
KEY_PAIR_EXPORT under ESP32_WIFI_ENABLE_WPA3_SAE since those paths
are exercised only by SAE/DPP keypair generation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-04-30 07:52:24 +02:00
Anas Nashif
1f77bdd703 drivers: wifi: siwx91x: include logging/log.h
Add missing include to logging/log.h.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-04-29 19:50:34 -05:00
Fin Maaß
15e565514f drivers: ethernet: wifi: remove redundant net_if_carrier_on()
For ethernet and wifi drivers the carrier
is on by default, no need to set it up in the
iface init again.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-29 11:55:10 -05:00
Chaitanya Tata
080b4f48fb drivers: nrf_wifi: Fix double counting for raw TX
Raw TX data path already handle proper counting of errors in TX, do not
double count.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2026-04-27 19:04:28 +01:00
Kapil Bhatt
226ce64e9b drivers: nrf_wifi: Add NRF_WIFI_WPA3 AUTO and FT_SAE security type
Add NRF_WIFI_WPA3_AUTO and NRF_WIFI_WPA3_FT_SAE security type in
nrf_wifi driver.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-04-27 07:22:07 +02:00
Kapil Bhatt
cd0953e356 drivers: nrf_wifi: Add kconfig for BT coex and BT slot allocation time
Add Kconfig for BT coex and slot allocation time.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-04-27 07:22:07 +02:00
Qingling Wu
17890befcd drivers: wifi: nxp: add WMM dependency for zero-copy feature
TX_RX_ZERO_COPY feature requires WMM support. Update Kconfig to
add NXP_WIFI_WMM as a dependency to prevent invalid configurations.

Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2026-04-23 08:17:14 -04:00
Qingling Wu
18c48acab9 drivers: wifi: nxp: fix build when WMM_UAPSD is disabled
Add #ifdef guards around WMM_UAPSD specific API calls in power save
functions to fix compilation errors when CONFIG_NXP_WIFI_WMM_UAPSD
is disabled.

Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2026-04-23 08:17:14 -04:00
Qingling Wu
af6470356c drivers: wifi: nxp: fix build when HOST_SLEEP is disabled
When CONFIG_NXP_WIFI_HOST_SLEEP is disabled:
- Provide a stub implementation of device_wlan_pm_action()
- Conditionally compile nxp_wifi_wlan_wakeup() helper function

This preserves PM device infrastructure while avoiding references to
host sleep symbols that are conditionally compiled in wifi_nxp module.

Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2026-04-23 08:17:14 -04:00
Abhinav Kulkarni
d1d141a44f driver: wifi: nxp: Enable IR for IW416 and IW61X
Updated kconfig to enable IR feature for IW416 and IW61X

Signed-off-by: Abhinav Kulkarni <abhinav.kulkarni@nxp.com>
2026-04-23 07:08:27 -04:00
Mori Fumita
677f13262b drivers: wifi: nxp: Make DHCP server optional for SoftAP
In 'drivers/wifi/nxp/Kconfig.nxp', 'NXP_WIFI_SOFTAP_SUPPORT'
currently uses 'select NET_DHCPV4_SERVER', but this can be restrictive.

This tightly couples L2 behavior (AP) and L3 (IP).
It shouldn't matter which node acts as the DHCP server once those
nodes are linked at L2. This commit introduces a new Kconfig option
to make the DHCP server optional.

Signed-off-by: Mori Fumita <mfumita@electromag.com.au>
2026-04-22 17:14:18 +02:00
Tejus Subramanya
5021f01fb4 drivers: wifi: siwx91x: always enable instant BG scan for connected scan
The NWP does not deliver advanced (background) scan results to the host
when instant BG scan is disabled, so Zephyr never gets SCAN_RESULT /
SCAN_DONE for that path.
- Hardcode enable_instant_scan to 1 in advanced_scan_config with a
  short comment explaining the NWP requirement.

Signed-off-by: Tejus Subramanya <ters@silabs.com>
2026-04-22 12:52:45 +02:00
Martin Koloska
01921899a6 drivers: wifi: esp32: explicit wifi status codes
Instead of generic success/error status use the appropriate wifi
manangement status codes that can be used to overwrite the status.

Signed-off-by: Martin Koloska <martin.koloska@bytesatwork.ch>
2026-04-21 18:40:24 -04:00
Jordan Yates
97f9a50f55 wifi: nrf_wifi: don't increase stacks for NRF70_SCAN_ONLY
Don't increase the networking subsystem stack sizes if `NRF70_SCAN_ONLY`
is enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-04-16 10:18:37 +02:00
Rex Chen
dc91be72e7 drivers: wifi: nxp: Fix CSI data overflow issue
Set the CSI data length accordfing to chips PHY usage in wifi driver
internal to fix the issue.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2026-04-15 05:43:02 -04:00
Tejus Subramanya
304a02cb50 drivers: wifi: siwx91x: raise NET_EVENT_WIFI_TWT from WiseConnect
Register SL_WIFI_TWT_RESPONSE_EVENTS and map sl_wifi_event_t /
sl_wifi_twt_response_t into struct wifi_twt_params, then call
wifi_mgmt_raise_twt_event() so applications receive TWT setup/teardown
results (resp_status, setup_cmd, negotiated parameters).

Signed-off-by: Tejus Subramanya <ters@silabs.com>
2026-04-14 22:34:02 -04:00
Fin Maaß
2820b49a40 drivers: wifi: esp32: fix ESP32_WIFI_STA_AUTO_DHCPV4
When ESP32_WIFI_STA_AUTO_DHCPV4 is
enabled functions from the dhcpv4 clients are
used, therefore we need to depend on it, otherwise
a user could activate that Kconfig without the dhcpv4
client being enabled, which would lead to a build error.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-04-14 22:33:12 -04:00
Om Srivastava
952d2c5509 wifi: esp_at: validate IPv4 family before sin_addr access
Coverity reported a potential out-of-bounds access in
drivers/wifi/esp_at/esp_offload.c when accessing sin_addr
without validating the sockaddr family.

ESP-AT offload supports IPv4 only, so add an explicit
NET_AF_INET check before dereferencing the IPv4-specific
structure to prevent invalid memory access.

Fixes: #100001

Signed-off-by: Om Srivastava <srivastavaom97714@gmail.com>
2026-04-14 22:07:49 -04:00
Fengming Ye
a4010304f7 drivers: wifi: nxp: fix build error for custom host platform
Fix build error when independent reset is enabled on custom host.
Add out-of-band reset kconfig option to guard dependency on host GPIO,
so that in-band independent reset can be supported by default.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2026-04-07 08:36:27 -05:00
Muzaffar Ahmed
84e95b9046 drivers: wifi: siwx91x: Fix twt_capable by inferring it from link mode
The twt_capable field in wifi status earlier was hardcoded to true. It
seems better to set it to true only when the link mode is 802.11ax or
higher.

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2026-04-02 08:48:26 -05:00
Jonathan Keller
388f386d60 drivers: wifi: infineon: Fix null pointer dereference in airoc_mgmt_scan
If the user passed no parameters, `params->scan_type` would dereference a
null pointer.

Signed-off-by: Jonathan Keller <jonathan.keller@infineon.com>
2026-03-30 10:09:02 -05:00
Pisit Sawangvonganan
c7ca7abc87 drivers: fix typo in (w1, watchdog, wifi)
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within:
- `drivers/w1`
- `drivers/watchdog`
- `drivers/wifi`

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2026-03-27 20:21:24 -04:00
Fin Maaß
625a3ee2fe drivers: wifi: esp32: reset data->scan_cb on fail
reset data->scan_cb on fail, otherwise we can't
try it again, because we check it at the begining
and return when it is already set.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-27 20:19:10 -04:00
Fin Maaß
e63d60915a drivers: wifi: esp32: set band info in scaned aps
set band info in scaned aps.
As the esp32-c5 supports 5 Ghz, the info can there otherwise
be wrong.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-26 14:01:25 -04:00
Fin Maaß
ff422cd6c8 drivers: ethernet: wifi: remove now redundant net_if_set_link_addr()
As net_if_set_link_addr() is now already done by the
overlaying net_mgmt, we no longer need to do it
in the drivers

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-03-24 10:49:59 -05:00
Sylvio Alves
d8dc6841d1 drivers: wifi: esp32: fix WPA3-SAE security type handling
Fix WPA3-SAE authentication handling for both STA and SoftAP
modes to properly use the PSA crypto backend.

STA mode: handle WIFI_SECURITY_TYPE_SAE, SAE_H2E and SAE_AUTO
security types with proper PMF configuration and SAE password
element derivation method selection (hunt-and-peck,
hash-to-element, or both). Also handle PSK_SHA256 as a
WPA2-PSK variant.

SoftAP mode: add WPA3-SAE authentication with the same PWE
method selection, guarded by ESP32_WIFI_SOFTAP_SAE_SUPPORT.

New Kconfig entries:
- ESP32_WIFI_ENABLE_SAE_H2E: hash-to-element derivation
- ESP32_WIFI_SOFTAP_SAE_SUPPORT: WPA3-SAE for AP mode
- ESP32_WIFI_WPA3_COMPATIBLE: WPA2/WPA3 transition mode

Update west.yml hal_espressif revision to include the
corresponding PSA crypto migration changes.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-23 17:38:18 -05:00
Sylvio Alves
e250cdbe0d drivers: wifi: esp32: fix PSA crypto selects
Fix PSA crypto algorithm and key type selects required by the
wpa_supplicant's mbedTLS crypto backend. These are needed for
AES cipher operations, ECDH/ECDSA, SHA-1/SHA-256, HMAC and CMAC
used during WPA key derivation and handshake.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-23 17:38:18 -05:00
Ibrahim Abdalkader
637d51f2e8 drivers: wifi: esp_hosted: Add support for the latest firmware.
Add support for esp-hosted v1.0.0.0.0 firmware.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2026-03-23 12:28:29 -05:00
Ibrahim Abdalkader
0d4b8b081a drivers: wifi: esp_hosted: Add the latest protocol.
Rename legacy esp-hosted protobuf protocol file, and add the
latest protocol.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2026-03-23 12:28:29 -05:00
Marek Matej
e0aab61c36 drivers: wifi: eswifi: add heap request
Samples using this wifi adapter is missing heap. Adding heap request
into eswifi driver.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2026-03-20 12:37:39 -05:00
Valerio Setti
8372f0939f drivers: esp32: bt|wifi: adjust Kconfigs for TF-PSA-Crypto 1.x
- replace legacy Kconfigs with corresponding PSA_WANT ones.
- extend Mbed TLS' CMake file in order to include these legacy ecdh module
  that was removed from TF-PSA-Crypto when ESP32 BT and WiFi drivers are
  built.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2026-03-20 12:32:52 -05:00
Gang Li
83f0cd4a59 driver: wifi: nxp: add support for network frequency band selection
If user selects a band, then we should restrict scanning channels to
that band. This can be used to speed up scanning by limiting scans
to specific channels when the network is known to not use all possible
channels.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2026-03-20 20:46:29 +09:00
Sylvio Alves
0f7c5ce22b drivers: wifi: esp32: increase default Wi-Fi system heap
The previous 40 KB default heap was at the edge for the Wi-Fi driver,
which can lead to allocation failures. Increase to 50 KB to provide
adequate memory for Wi-Fi operation.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-03-19 14:53:26 -05:00