Commit graph zephyr/drivers/wifi
Author SHA1 Message Date
Etienne Carriere
e4c2f19046 drivers: wifi: ameba: Refer to DT_DRV_INST(), not DT_DRV_COMPAT
Correct inline comment that should refer to DT_DRV_INST() macro
instead of DT_DRV_COMPAT macro.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-07-07 09:57:10 +02:00
Daniele Cloralio
29c92983ee drivers: wifi: infineon: clear scan callback on scan start failure
airoc_mgmt_scan() sets data->scan_rslt_cb before calling whd_wifi_scan().
If whd_wifi_scan() fails, the function returnes -EAGAIN without clearing
scan_rslt_cb. The next scan request may return -EINPROGRESS even if no scan
was actually running.

Clear data->scan_rslt_cb in the whd_wifi_scan() error path so driver
state remains consistent.

Signed-off-by: Daniele Cloralio <d.cloralio@arduino.cc>
2026-07-04 11:41:32 -04:00
Maochen Wang
405c2bd5ae drivers: wifi: nxp: fix missing uAP success event when IPv6 is disabled
When CONFIG_NXP_WIFI_IPV6 is not enabled, the
WIFI_EVENT_UAP_NET_ADDR_CONFIG message is never sent to wlcmgr_task
because it relies solely on the NET_EVENT_IPV6_DAD_SUCCEED callback.
This causes WLAN_REASON_UAP_SUCCESS to never be triggered, leaving
applications waiting indefinitely for WIFI_STATUS_AP_SUCCESS.

Send WIFI_EVENT_UAP_NET_ADDR_CONFIG directly in
net_configure_address() when IPv6 is disabled, so the uAP state
machine can proceed to CM_UAP_IP_UP and emit the success event
regardless of IPv6 configuration.

Assisted-by: WChat:Claude
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2026-07-02 13:03:43 +01:00
Maochen Wang
3915199255 drivers: wifi: nxp: use wlan API for country code
Replace wifi_get_country_code() with wlan_get_country_code() in the
shim driver. The shim driver should call WLAN layer APIs (wlan.h)
rather than internal wifi driver APIs (wifi.h) directly.

Assisted-by: WChat:Claude
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2026-07-02 13:02:05 +01:00
Maochen Wang
de3dfa7da6 drivers: wifi: nxp: add raw scan result support
Add support for CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS in the NXP WiFi
driver. When enabled, the driver emits NET_EVENT_WIFI_RAW_SCAN_RESULT
events containing reconstructed 802.11 beacon frames with raw IEs
from each scanned BSS.

This allows applications to access information not available in the
standard wifi_scan_result struct, such as country code, RSN IE, and
mobility domain.

When CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS_ONLY is set, normal parsed
scan results are suppressed.

The raw frame data includes a reconstructed 802.11 MAC header (24B)
and fixed fields (12B) prepended to the IEs, making it compatible
with the existing wifi shell raw scan result handler.

Assisted-by: WChat:Claude
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2026-07-02 13:02:05 +01:00
Jamie McCrae
38f10c7aec drivers: wifi: nrf_wifi: Fix missing zephyr/ include path
Fixes this missing part in includes

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-07-02 13:01:49 +01:00
Kapil Bhatt
290eed0341 drivers: wifi: Move NRF70 from Experimental to Supported for 54LM20A/B
Move the Config WIFI_NRF70 from Experimental to Supported for
NRF54LM20A and NRF54LM20B boards.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
2d41b91811 drivers: wifi: Move TX injection mode from Experimental to Supported
Move the TX injection mode feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
07e468ec68 drivers: wifi: Move Monitor mode from Experimental to Supported
Move the Monitor mode feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
5661ff82f1 drivers: wifi: Move Promiscuous mode from Experimental to Supported
Move the Promiscuous mode feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
6c0a8ffb69 drivers: wifi: Move RPU recovery from Experimental to Supported
Move the RPU recovery feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Kapil Bhatt
c9f7f144f9 drivers: wifi: Move Zero copy TX from Experimental to Supported
Move the Zero copy TX feature from Experimental to Supported.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-07-01 15:25:00 +01:00
Swamidas Nampalli
680a351c7d drivers: wifi: siwx91x: fix TX net_pkt double unref
siwx91x_send() incorrectly unrefs a caller-owned TX net_pkt after
transmit. In the TX path, the packet is owned by the networking/L2
stack, while the driver only borrows it long enough to read or copy the
frame data.

As a result, the packet may be returned to the pool prematurely while
upper layers still consider it valid. Once released, the same memory can
be reused for a different allocation, creating a packet lifetime bug
similar to a use-after-free condition. This memory reuse can lead to
unexpected behavior and explain hangs in the transmit path.

Signed-off-by: Swamidas Nampalli <Swami.Das@silabs.com>
2026-07-01 05:23:13 -04:00
Etienne Carriere
b0b25c35c9 drivers: use <> to include Zephyr headers instead of ""
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.

This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
    `grep -rsl "#include \"zephyr/" drivers/`

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-06-30 06:49:18 -04:00
Michael Zimmermann
e10af22991 tree-wide: replace usages of k_work_q thread with thread_id
The `thread` field is not initialized, if it's being animated via
k_work_queue_run instead of k_work_queue_start.

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2026-06-29 22:17:45 -04:00
Jonathan Beri
dc2933fa30 drivers: wifi: airoc: free undersized net_buf in host_buffer_get
airoc_wifi_host_buffer_get() returns WHD_BUFFER_ALLOC_FAIL when
net_buf_alloc_len() yields a buffer smaller than the requested size, but
it does so without releasing that buffer, leaking it from the fixed
airoc_pool. Release the undersized buffer with net_buf_unref() before
returning the failure.

Found while characterizing airoc_pool exhaustion under sustained traffic
on rpi_pico2/rp2350a/m33/w (CYW43439). Build- and runtime-tested on that
board: WiFi associate + DHCP + sustained ping with no pool exhaustion
from this path.

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>

Signed-off-by: Jonathan Beri <jmberi@gmail.com>
2026-06-26 07:47:55 -04:00
Kevin Chan
54cf1b3bd5 drivers: wifi: infineon: fix supplicant compiler error
PR#107029 is merged, it provide supporting wpa_supplicant.
That means wifi shell sample should be able to support
two different mechanism. One use wpa_supplicant,
another one use wifi_mgmt_ops directly without wpa_supplicant.

Some structures like wpa_supp_event_supported_band or functions
in airoc_wifi.c belongs to wpa_supplicant only.
Therefore if we compile wifi shell without wpa_supplicant,
it causes build error.

Signed-off-by: Kevin Chan <kevin.chan3@infineon.com>
2026-06-24 07:44:02 -04:00
Xinyu Hong
e5d0b311c8 drivers: wifi: nxp: fix compile issue
On mimxrt1060_evk, CONFIG_CODE_DATA_RELOCATION_SRAM
is enabled by the board configuration, which causes arm_core_mpu.c
to reference __ram_text_reloc_start and __ram_text_reloc_size.
These symbols are only generated when at least one function
is relocated to RAM_TEXT. Since no code was previously placed
there, the build fails with undefined reference errors.
Fix this by relocating hot-path functions from ipv6_fragment.c
and ipv4_fragment.c to RAM_TEXT using function-level FILTER,
Only throughput-critical functions in the RX/TX fragment path
are selected, which also improves throughput performance.

Signed-off-by: Xinyu Hong <xinyu.hong@nxp.com>
2026-06-24 07:40:30 -04:00
Gang Li
6c96791f5d drivers: wifi: nxp: relocate net_arp_prepare to ITCM
Move the hot functions to ITCM_TEXT (SRAM) to improve
throughput for UDP TX.
net_arp_prepare() is called on every IPv4 TX packet
from ethernet_send() for MAC address resolution.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2026-06-23 11:29:11 +02:00
Tom Burdick
4e6f624292 wifi: Airoc issue fixes
Some review showed there were some small issues in the airoc_wifi
driver. A duplicated semaphore give on error and a memory leak when not
releasing a buffer.

Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
2026-06-23 11:28:52 +02:00
Chaitanya Tata
7fce719a51 drivers: wifi: nrf_wifi: Don't error on flag-clear for absent peer
hostapd clears the AUTHORIZED flag while a station is being torn
down (e.g. the EAP-Failure that ends every WPS/WSC exchange), by
which point the peer may already be gone from the driver peer
table. Clearing a flag on an absent peer is a harmless no-op, so
treat it as success instead of logging "Unknown PEER" and failing
the op. Setting a flag on a missing peer remains a logged error.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
2026-06-22 17:57:34 +02:00
Ramprasad Kannappan
1daa8ca447 drivers: wifi: infineon: wpa_supplicant support integration
In this PR, wpa_supp interfacing to the infineon's wifi driver

Signed-off-by: Ramprasad Kannappan <Ramprasad.Kannappan@infineon.com>
2026-06-22 14:24:58 +02:00
Maochen Wang
9bc255274e drivers: wifi: nxp: optimize code relocation to fix ITCM overflow
Resolve ITCM overflow (2928 bytes) on mimxrt1060_evk by applying
function-level FILTER to relocate only hot-path functions instead
of entire files. This reduces ITCM usage from 100% to 70.09%
with no throughput regression.
Use FILTER for net stack, socket, SDIO, and zperf files
Keep kernel primitives as whole-file (inline dependencies)
Add zvfs, poll, condvar, timeout to relocation list
Restrict to CONFIG_SPEED_OPTIMIZATIONS only

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2026-06-19 11:13:07 +02:00
Sylvio Alves
e9f9d266fc drivers: wifi: esp32: start wifi at init for ble coexistence
Start the Wi-Fi driver during initialization so coexistence is
enabled early. Without it the Wi-Fi pp task blocks at boot when BLE
is also used, hanging the device.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-06-19 11:11:07 +02:00
Chaitanya Tata
1baf923d43 drivers: wifi: nrf70: Raise raw scan events outside vif lock
Copy beacon/probe data under vif_lock, then post the net_mgmt
event without holding the lock. Avoids stalling firmware RX when
the event queue backs up during raw scan floods.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
2026-06-18 09:10:23 -05:00
Chaitanya Tata
e27ed412d5 drivers: wifi: nrf70: Fix display scan state on result failure
Clear scan_in_progress and notify the application when
nrf_wifi_disp_scan_res_get_zep() fails. Do not clear the flag
early on success; let the final result event own teardown.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
2026-06-18 09:10:23 -05:00
Anas Nashif
ea1fbf3588 driver: fix various typos
Fixed various typos under drivers/

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-17 10:12:27 -04:00
Chaitanya Tata
a741c7300c drivers: wifi: nrf70: add Kconfig for FW patch download chunk size
Expose the chunk size used when downloading the nRF70 firmware patches
to the RPU as NRF70_PATCH_DL_CHUNK_SIZE. It defaults to 4096 bytes, and
to 2048 bytes on the nRF54H.

Each chunk maps to a single SPI/QSPI transfer, so it has to fit both the
host EasyDMA MAXCNT and any DMA bounce region the bus driver relies on.
The previous hard-coded 8192 overran the 13-bit EasyDMA MAXCNT on nRF91
(max 8191 bytes) and the 4 KB cpuapp DMA bounce region on nRF54H20. The
oversized transfer was rejected and the error dropped on the write path,
leaving the RPU with a corrupt patch and a bad boot signature.

On the nRF54H the bounce buffer comes from the small 4 KB cpuapp DMA
region that is shared with the console UART and other peripherals, so
even a 4096 byte chunk cannot find contiguous space there. Default to
2048 on that SoC and keep 4096 elsewhere, which also stays within the
nRF91 MAXCNT while keeping the chunk count low.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor:Auto
2026-06-17 10:06:41 -04:00
Kapil Bhatt
06ea49c1b9 drivers: wifi: Enable Wi-Fi keep-alive by default
Enable Wi-FI keep-alive by default. If not configured,
devices may experience unintended disconnections from certain APs.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2026-06-17 09:49:51 +02:00
Qiankun Li
79d1997d86 drivers: wifi: nxp: add Kconfig for SLIM feature
Add NXP_WIFI_SLIM and NXP_WIFI_SLIM_DISABLE_DEBUG Kconfig options
for resource-constrained platforms.

NXP_WIFI_SLIM disables some advanced Wi-Fi features by default.
NXP_WIFI_SLIM_DISABLE_DEBUG disables Wi-Fi error and warning logs.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2026-06-12 15:30:56 +02:00
Qingling Wu
ed5ceddb97 drivers: wifi: nxp: remove unused NXP Wi-Fi configs
Remove obsolete Kconfig options that are no longer referenced
in the codebase:
- NXP_WIFI_CAPA: uAP Wi-Fi Capability
- NXP_WIFI_EU_VALIDATION: EU Validation Support

Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2026-06-12 10:07:18 +02:00
Anton Rejoe
c006b78da3 drivers: wifi: nxp: add OWE security support
Adds OWE security mapping for scan, connect and SoftAP security
configuration in the NXP Wi-Fi driver.

Signed-off-by: Anton Rejoe <antonrejoe@gmail.com>
2026-06-11 15:01:41 -04:00
Anton Rejoe
3b93582142 drivers: wifi: esp32: add OWE security support
Adds OWE security mapping for scan, connect and status operations
in the ESP32 Wi-Fi driver. OWE is supported for STA mode only;
AP mode is not supported.

Signed-off-by: Anton Rejoe <antonrejoe@gmail.com>
2026-06-11 15:01:41 -04:00
Siddhant Modi
d715c83181 drivers: wifi: esp32: add WPA Enterprise support
Wire the ESP32 Wi-Fi driver to Espressif's Enterprise EAP client APIs.

This adds support for WPA2/WPA3 Enterprise station connections through
Zephyr Wi-Fi management, including EAP-TLS, PEAP, TTLS, and WPA3
Enterprise mode selection.

Signed-off-by: Siddhant Modi <siddhant.modi@gmail.com>
2026-06-09 15:37:14 +02:00
Jérôme Pouiller
797b7ca255 driver: *: siwx91x: Uniformize the names
Silabs siwx91x is referenced using several names. Unify them.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2026-06-08 23:13:00 +02:00
minyuan xue
b50dd014fe drivers: wifi: add ameba wifi driver support
Add realtek ameba wifi driver.

Signed-off-by: minyuan xue <minyuan_xue@realsil.com.cn>
2026-06-08 16:33:48 +02:00
Muzaffar Ahmed
b2db30b89c drivers: wifi: siwx91x: Improve TWT events and responses
Improved the mapping from SL TWT events to Zephyr params.

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2026-06-08 13:58:36 +02:00
Madhab Sharma
5ce49e5c3c drivers: wifi : Use net_eth_set_if_type_wifi() API
Replace direct ethernet context manipulation with new
net_eth_set_if_type_wifi() API across all Wi-Fi drivers.

Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
2026-06-05 09:37:33 +02:00
Muzaffar Ahmed
654121a7a4 drivers: wifi: siwx91x: Restrict TX out of TWT Service Period by default
Currently, restrict_tx_outside_tsp is false by default, and with that,
the NWP may transmit data during TWT sleep time. Many APs do not support
this also should not be the default behavior.

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2026-06-04 18:19:31 +02:00
Tejus Subramanya
b27420e844 drivers: wifi: siwx91x: honor Kconfig dwell times for BG scan
In the SL_WIFI_SCAN_TYPE_ADV_SCAN path, the Kconfigs
ADV_ACTIVE_SCAN_DURATION / ADV_PASSIVE_SCAN_DURATION were used only as
a fallback when the per-call wifi_scan_params dwell fields were 0, so
any non-zero per-call value would override them and reach the radio.

BG-scan dwell is a system-tuned policy controlled by Kconfig (like
trigger_level and enable_multi_probe); per-call dwell fields belong to
the foreground scan path only. Always use the Kconfig values for
advanced_scan_config and ignore per-call params on this path.

Signed-off-by: Tejus Subramanya <ters@silabs.com>
2026-06-04 14:05:55 +02:00
Tejus Subramanya
1e044f6ff6 drivers: wifi: siwx91x: route Wi-Fi PS through nwp_apply_power_profile
WiseConnect zeros the BT half of its cached coex performance profile
on every Wi-Fi disconnect, leaving BT out of power save and preventing
the NWP from sleeping after re-association.

Delegate Wi-Fi power-save to siwx91x_nwp_apply_power_profile(), which
already owns both BT and Wi-Fi halves of the coex profile. Extend the
helper to accept an optional sl_wifi_performance_profile_v2_t override
so the Wi-Fi driver can pass its tailored profile (listen_interval,
dtim_aligned_type, monitor_interval); BT-only and init call sites pass
NULL to keep their current behaviour.

Signed-off-by: Tejus Subramanya <ters@silabs.com>
2026-06-04 11:07:57 +02:00
Madhab Sharma
b333d1f4cc drivers: wifi: esp32: Prevent power save in AP mode
Currently, there was no check in place if set_power_save()
was called in AP mode which might result in undefined
behavior.

Additionally, esp_wifi_get_config() doesn't return an
error when querying for STA config in AP mode.

Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
2026-06-03 18:44:19 +02:00
Tejus Subramanya
0ade2640ca drivers: wifi: siwx91x: fix listen-interval and DTIM wake cadence
The NWP ignored the host programmed listen_interval and fell back to
its ~1s default, so both WIFI_PS_WAKEUP_MODE_LISTEN_INTERVAL and
WIFI_PS_WAKEUP_MODE_DTIM woke the device roughly once per second
regardless of the AP's DTIM period or the host-requested LI.

Set SL_WIFI_JOIN_FEAT_PS_CMD_LISTEN_INTERVAL_VALID in
siwx91x_iface_init() so the NWP honors the listen_interval supplied
via the host-side power-save command path (i.e. the value programmed
through sl_wifi_set_performance_profile_v2()) instead of substituting
its built-in default.

Signed-off-by: Tejus Subramanya <ters@silabs.com>
2026-06-03 18:38:18 +02:00
Fin Maaß
ad056d5454 wifi: don't select WIFI_OFFLOAD wrongly
don't select WIFI_OFFLOAD, when it is a native driver without offloading.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-06-03 08:12:39 -05:00
T Madhusudhan Rao
b577094164 wifi: nxp: fix build failure in IPv6-only configuration
The NXP Wi-Fi middleware unconditionally accesses IPv4 network
structures and DHCPv4 APIs, causing compiler and linker failures
when CONFIG_NET_IPV4 is disabled (e.g., in IPv6-only environments).

This commit introduces Kconfig guards around the IPv4-specific
logic. Functionally, when IPv4 is disabled, the middleware now
safely bypasses IPv4 static address assignment, IPv4 address and
netmask retrieval, and DHCPv4 client initialization.

Additionally, variables that become unused in IPv6-only builds
are properly suppressed using the ARG_UNUSED() macro.

Fixes #87647

Signed-off-by: T Madhusudhan Rao <tetakalam@aerlync.com>
2026-06-03 11:01:55 +01:00
Thomas Hebb
68a329a70b style: Fix various typos across the tree
Some of these are in user-visible log messages, but none are breaking
changes for applications.

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2026-06-03 08:26:41 +02:00
Madhab Sharma
fb9ecd7afc drivers: wifi: esp32: Set Wi-Fi mode post handling esp_wifi_init return
esp_wifi_set_mode can fail silently if esp_wifi_init was not successful.
Move the mode set and handle its return value post esp_wifi_init error
checking.

Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
2026-06-03 08:25:53 +02:00
Madhab Sharma
ff590c2214 drivers: wifi: esp32: use net_eth_set_if_type_wifi() API
Use net_eth_set_if_type_wifi() instead of directly accessing
ethernet_context->eth_if_type to set the interface type.

Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
2026-06-02 20:21:35 -04:00
Anas Nashif
d0b389da9e kernel: remove redundant kernel_structs.h includes
kernel.h implies kernel_structs.h via kernel_includes.h, making
explicit inclusion of kernel_structs.h unnecessary whenever kernel.h
is already included in the same translation unit.

Remove the redundant includes across arch, boards, drivers, kernel,
lib, samples, subsys, and tests trees.

in include/zephyr/kernel_structs.h:
 *  2. kernel.h shall imply kernel_structs.h, such that it shall not be
 *    necessary to include kernel_structs.h explicitly when kernel.h is
 *    included.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-06-02 20:24:14 +02:00
Hui Bai
b03a3e250d driver: wifi: nxp: Unblock low power when WLAN is disabled
Allow low power mode if WLAN is disabled

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2026-06-02 11:44:56 +02:00