Extend the ESP32 Wi-Fi driver to support ESP32-C5, the first
Espressif SoC with dual-band Wi-Fi 6 (2.4 GHz and 5 GHz).
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The winc1500_socket function returns a socket index that was only
being checked for negative error values. Coverity identified that
the index was not being verified against the upper bound of the
socket_data array, potentially leading to an out-of-bounds write.
Added an explicit check to ensure the socket index is within the
valid range [0, CONFIG_WIFI_WINC1500_OFFLOAD_MAX_SOCKETS].
Fixes#84708
Signed-off-by: David J. Leach, Jr. <tasmar@gmail.com>
Adapt all Espressif SoC and driver code to the updated
hal_espressif module synced with IDF master branch.
Main changes:
- clock control: delegate peripheral clock gating to HAL
layer using new clock/reset APIs
- SPI/GDMA: adapt to restructured DMA HAL with new channel
allocation and configuration interfaces
- ethernet: add RMII clock configuration and PHY management
- GPIO: simplify using direct HAL function calls
- flash: adapt to updated SPI flash HAL interfaces
- linker scripts: update IRAM/DRAM mappings for new HAL
object files
- DTS: fix ESP32-S2 PSRAM dcache1 address to match actual
MMU mapping region (0x3f800000 DRAM1 instead of 0x3f500000
DPORT which lacks 8-bit access capability)
- west.yml: update hal_espressif revision
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Adds a Kconfig option to detect if checksum offloading
is supported by any driver and one to activate it.
Main benefit is that `net_if_need_calc_rx_checksum()` and
`net_if_need_calc_tx_checksum()` are now inline and therefore the
compiler can optimize more, when checksum offloading is not supported.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add scheduled scan apis support for supplicant.
Add kconfig options to set default iteration and scheduled scan
min interval.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
This update configures the board to support the CYW55513 connectivity
module by enabling the required Kconfig symbols and defining the
HCI UART interface in the Devicetree
Changes:
- dts: Enable the Infineon HCI UART node with hardware flow control.
- pinctrl: Configured UART pins (TX, RX) and hardware flow control
pins (RTS, CTS) specifically for the Bluetooth HCI interface
- defconfig: Adjusted CONFIG_MAIN_STACK_SIZE to provide sufficient
headroom for the Bluetooth HCI driver and event processing.
- kconfig: make AIROC_WIFI6 selection conditional on WIFI to fix
dependency warnings in BLE-only builds.
Signed-off-by: Merin George <merin.george@infineon.com>
IPv6 addresses were not being removed when WiFi connection fails
from the AP side (STATE_UNASSOCIATED). This causes stale IPv6
addresses to remain on the interface, preventing proper cleanup
and potentially causing issues on subsequent connection attempts.
Set the network interface to dormant state when STATE_UNASSOCIATED
is detected in the WiFi module stats event handler. This ensures
that IPv6 addresses are properly cleaned up during connection
failures.
Signed-off-by: Swamidas Nampalli <Swami.Das@silabs.com>
Reconfigure the bandcfg when disabling AP so that the band
configurations are match between hostapd and wifi driver.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
In 55c49cdb8f wifi
drivers were changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add SDHC zero copy support for wifi.
This depends on SDHC host requirement
1. CONFIG_SDHC_SUPPORTS_SCATTER_GATHER_TRANSFER=y.
2. CONFIG_NET_BUF_DATA_SIZE to be 256 multiples.
3. CONFIG_NET_BUF_ALIGNMENT=32 (host cache line size).
4. CONFIG_NET_L2_ETHERNET_RESERVE_HEADER=y (to 4 bytes align net buffer).
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Replace usage of atoi() with strtol() when parsing numeric values
from ES-WIFI AT command responses.
strtol() provides well-defined behavior and allows proper error
handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
This offloaded wifi driver is deprecated and will be removed
in a future release. It is currently scheduled to be removed in
Zephyr 4.6. The reason for deprecation is that there is no
maintainer for this driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This offloaded wifi driver is deprecated and will be removed
in a future release. It is currently scheduled to be removed in
Zephyr 4.6. The reason for deprecation is that there is no
maintainer for this driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Allow the application to enable power-saving features of the ESP32 wifi
radio using the normal networking APIs.
Signed-off-by: Mandus Börjesson <borjessonmandus@gmail.com>
For wifi embedded supplicant, use params->sae_password and
params->sae_password_length for SAE/SAE-H2E/SAE-AUTO in nxp_wifi_connect
and nxp_wifi_start_ap, as psk is NUll and psk_length is 0.
This resolves WPA3-SAE auth failures.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
When build:
west build -p -b rpi_pico2/rp2350a/m33/w zephyr/samples/net/wifi/shell
Warnings occur (leading to errors in Twister runs):
.../drivers/wifi/infineon/airoc_wifi.c:749:9: warning: enumeration value
'__WIFI_FREQ_BANDWIDTH_AFTER_LAST' not handled in switch [-Wswitch]
.../drivers/wifi/infineon/airoc_wifi.c:749:9: warning: enumeration value
'WIFI_FREQ_BANDWIDTH_UNKNOWN' not handled in switch [-Wswitch]
749 | switch (params->bandwidth) {
| ^~~~~~
Signed-off-by: Stephan Linz <linz@li-pro.net>
The driver and module now supports nRF70 only, nRF71 support will be
added in the future using a new driver.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Let's get rid of deprecated sl_wifi_set_callback. The new
sl_wifi_set_callback_v2 changes the callback prototypes, but they kept the
semantic.
We also take this opportunity to slightly clean up the prototupes of the
callbacks.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
sl_wifi_performance_profile_t is deprecated. The migration to
sl_wifi_performance_profile_v2_t is pretty easy, so there is not reason to
delay it (in fact, the two versions only differ in binary compatibility,
the API is still compatible).
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
sli_save_ap_configuration() and sli_get_saved_ap_configuration() have been
renamed respectively in sli_wifi_save_ap_configuration() and
sli_wifi_get_saved_ap_configuration().
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The eswifi socket offload driver's setsockopt() handler returns success (0)
for TLS_HOSTNAME and TLS_PEER_VERIFY options without implementing them.
This causes applications to believe TLS hostname and peer certificate
verification is enabled when it may not be, potentially enabling
man-in-the-middle attacks.
The Inventek eS-WiFi module's default P9 setting (0=None) means no
certificate verification occurs unless explicitly configured out-of-band.
Return -ENOTSUP instead, making the limitation explicit so applications
can detect and handle unsupported TLS options appropriately.
Signed-off-by: Pavel Kohout <pavel.kohout@aisle.com>
Remove the negative value check on bss_max_idle_period, which is
defined as an unsigned type and can never be less than zero.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Refactor scan_done_handler to retrieve Access Point (AP) records one
by one rather than pre-allocating a large buffer for the entire list.
Previously, the driver attempted to k_malloc space for all detected APs
simultaneously. In environments with high AP density or under system
memory pressure, this allocation would often fail, resulting in no
scan results being reported.
Improvements:
- Switched to stack-allocated wifi_ap_record_t to process entries.
- Replaced esp_wifi_scan_get_ap_records with a while-loop using
esp_wifi_scan_get_ap_record to reduce peak heap usage.
- Added esp_wifi_clear_ap_list() to ensure hardware resources are
freed after the loop completes.
- Added warning log on unexpected scan fetch failures.
This makes Wi-Fi scanning significantly more robust in memory-constrained
scenarios.
Signed-off-by: Madhab Sharma <madhabsharma94@gmail.com>
Configure all nRF70 GPIO pins (BUCKEN, VDDIO_CTRL, SR RF switch) to
OUTPUT_INACTIVE state during driver initialization to prevent floating
pins from accidentally powering the module or affecting RF switch
before the interface is brought up.
This addresses an issue where GPIO configuration was delayed until
the interface was brought up for the first time, leaving voltage control
pins floating which could result in unintended power supply.
Fixes#100993.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Pass the selected channel and bandwidth to WHD, so the AP
enables on the requested channel/width.
Signed-off-by: Liu Gavin (CSS ICW ENG WFS SW WFSW 1) <Gavin.Liu@infineon.com>
Fix redundant initialization of vif_ctx_zep where the variable was
initialized at declaration and immediately overwritten before being
read.
Remove the redundant initialization to improve code clarity.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Wifi chip module may depend on SDHC(SDIO) module.
Currnetly, default init. priority is
CONFIG_WIFI_INIT_PRIORITY(80) & CONFIG_SDHC_INIT_PRIORITY(85).
It causes the issue.
Signed-off-by: Kevin Chan <kevin.chan3@infineon.com>
__parse_ipv4_address() never reports errors and always returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Verify that requested data can fit into the transmit buffer on send to
avoid out-of-bound memory writes.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
- add SDHC driver code to support both SDMMC and SDIO fucntion
- add SDHC dts node and Kconfig
- add clock configuration for SDHC
Signed-off-by: Kevin Chan <kevin.chan3@infineon.com>
When using shell the users input raw header as big-endian, so, add
support for both formats for the magic number.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
When ESP32 operates in AP-only mode the network interface is
initialized with the STA MAC address, but the Wi-Fi hardware operates
with the AP MAC address (typically STA MAC + 1).
Some Wi-Fi clients correctly address frames to the AP MAC, causing them
to be dropped by the ethernet L2 layer with "Dropping frame, not for me"
because the interface link address doesn't match.
Fix this by updating the interface link address to the AP MAC when
enabling AP mode, and restoring the STA MAC when disabling AP mode.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>