Commit graph

789 commits

Author SHA1 Message Date
Jérôme Pouiller
9a1ebee72b drivers: wifi: siwx91x: Extract AP related functions
siwx91x_wifi.c starts to contains to much code. Let' simplify it by
grouping all the Access Point related functions in a separated file.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
6dd601c9f1 drivers: wifi: siwx91x: Extract scan related functions
siwx91x_wifi.c starts to contains to much code. Let's simplify it by
grouping all the scan related functions in a separated file.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
f6f387993f drivers: wifi: siwx91x: Fix siwx91x_wifi_socket.h syntax
Functions in siwx91x_wifi_socket.h are not declared static. So it create
duplicated symbols if the file is included twice.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jukka Rissanen
cdc6c324d7 net: dns: Save info about source when configuring DNS servers
Remember which DNS server was added by a source like DHCPv4 or v6
message. This will allow system to remove DNS servers that were added by
that source. Then when stopping for example DHCP, we can remove those
specific DNS servers and not leaving DNS servers hanging in the system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-26 14:08:19 +02:00
Chun-Chieh Li
2fd79998d0 drivers: wifi: esp_at: fix +CIPRECVDATA parsing for AT 1.7
This fixes +CIPRECVDATA parsing for AT 1.7. Per AT 1.7 spec,
remote ip/port is not replied.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-06-26 11:19:56 +02:00
Qiankun Li
702221da2d drivers: wifi: nxp: Fix TWT setup issue.
When try to set twt, system will try to
get interface status firstly.
In shim driver, miss filling twt_capable field.
The twt_capable is set as false by default.
Failed to set twt because of incorrect
twt_capable.

Add enhance code to fill twt_capable field
in shim driver.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-26 11:19:48 +02:00
Chun-Chieh Li
8a9dc13e91 drivers: wifi: esp_at: fix rx_sock not ref-counted
This fixes rx_sock is not reference-counted, or crash error on reference
to released socket.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-06-25 15:49:26 -10:00
Chun-Chieh Li
db59acba5e drivers: wifi: esp_at: fix deadlock in socket close path
This fixes deadlock in socket close path. In the scenario:
1. on_cmd_ipd/esp_socket_rx invokes esp_socket_ref_from_link_id
   and increments refcount.
2. zvfs_close/esp_put locks cond.lock.
3. zvfs_close/esp_put waits on sem_free.
4. on_cmd_ipd/esp_socket_rx waits on cond.lock before esp_socket_unref.
5. sem_free waits on esp_socket_unref for refcount reaching zero.

As we detect socket is closing, we can ignore last rx data and escape
from the trap.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-06-25 15:49:26 -10:00
Chun-Chieh Li
622fddb0b8 drivers: wifi: esp_at: fix premature socket release
This fixes premature socket release. Without this fix, system will crash
because esp_rx thread can still hold reference to the socket in the
following cases:
1. esp_rx thread has got the socket reference but hasn't unref'ed
   via esp_socket_unref.
2. esp_rx thread can still get the socket reference for refcount not
   being zero in esp_socket_ref.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-06-25 15:49:26 -10:00
Gang Li
75ac644ee3 drivers: wifi: nxp: enable net monitor mode on IW610
Enable CONFIG_NXP_WIFI_NET_MONITOR,
       CONFIG_NXP_WIFI_HOST_TXRX_MGMT_FRAME,
       CONFIG_NXP_WIFI_MMSF on IW610.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-06-24 15:36:04 -05:00
Maochen Wang
1e5b21f487 drivers: wifi: nxp: add Kconfig of NXP_WIFI_AUTO_INIT
Automatically initialize NXP Wi-Fi driver and FW for Wi-Fi networking
operation. Disable this setting if Wi-Fi module will be used for
non-Wi-Fi use cases (manufacturing/calibration/test).

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-24 14:20:02 +02:00
Maochen Wang
f4a0beb2b7 samples: net: wifi: Enable NXP_WIFI_TX_RX_ZERO_COPY for IW610
Enable NXP_WIFI_TX_RX_ZERO_COPY for IW610, which will reduce extra memcpy
between net stack and driver in TX data path and avoid the allocation of
RXPD and mlan_buffer in RX data path, to improve the throughput
performance.
Increase CONFIG_NET_BUF_DATA_SIZE to hold one packet in one buffer.
NXP_WIFI_TX_RX_ZERO_COPY can be enabled not only for NXP_RW610 case.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-24 09:17:03 +02:00
Pisit Sawangvonganan
d0b9a4e43e drivers: wifi: nxp: use IS_ENABLED() for CONFIG_NXP_WIFI_SOFTAP_SUPPORT
Replaced conditional compilation of `CONFIG_NXP_WIFI_SOFTAP_SUPPORT`
where applicable with IS_ENABLED() macro to improve code readability.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-06-24 09:13:58 +02:00
Pisit Sawangvonganan
2265dd7a93 drivers: wifi: nxp: fix include guard typo in nxp_wifi_drv.h
Fix include guard name and added trailing comment to final #endif.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2025-06-24 09:13:58 +02:00
Ravi Dondaputi
11a3969221 drivers: wifi: Introduce option to use K_HEAP
Provide option to revert to K_HEAP instead of using
dedicated heaps in Wi-Fi driver.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2025-06-24 09:13:20 +02:00
Benjamin Cabé
533fcc9a3f drivers: wifi: update non-inclusive language
use "Accept/block List" terminology instead of white/black list

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-23 16:31:16 -05:00
Muzaffar Ahmed
56a0160e30 drivers: wifi: siwx91x: Fix buffer overflow in client disconnect
Copy only WIFI_MAC_ADDR_LEN bytes to sta_info.mac instead of dynamic
length

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2025-06-23 12:46:10 -07:00
Muzaffar Ahmed
73a1bef079 drivers: wifi: siwx91x: Raise AP enable event from driver
Raising event from driver itself after successful AP start,
instead of waiting for an event from SDK/TA FW. TA used to send an
asynchronous event earlier but currently does not.

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2025-06-23 12:46:10 -07:00
Kapil Bhatt
39e6f0170f drivers: nrf_wifi: Add Kconfig for Dynamic ED
Add Kconfig to enable/disable Dynamic ED which add support for
proprietary algorithm to enhance performance in high-traffic channels.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-06-23 09:46:47 +02:00
Jérôme Pouiller
fbc70337e8 modules: hal_silabs: Update WiseConnect SDK
Import the new version of the WiseConnect SDK.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-20 13:22:57 -04:00
Maochen Wang
7e3f5814e4 drivers: wifi: nxp: only enable NXP_WIFI_TC_RELOCATE for RW612
Only by default enable NXP_WIFI_TC_RELOCATE for RW612, which will
relocate traffic API into RAM. But for other platform, for example
the RT series, the ITCM/DTCM is a more suitable place for critical
code.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-20 16:23:52 +02:00
Qingling Wu
2016f05860 drivers: nxp: wifi: Enable 11AX density config by default for IW610
Enable NXP_WIFI_MMSF by default for IW610

Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2025-06-20 08:52:53 +02:00
Marek Matej
720db7bf5e drivers: wifi: esp32: Fix buffer config
Prevent to allocate buffers cache if Wi-Fi heap is not used.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-06-18 17:46:03 -04:00
Hui Bai
4868c8acae drivers: wifi: nxp: Host sleep handshake enhancement
To reduce low power current value, added host sleep handshake
enhancement. If CPU3 is wokenup by WLAN, do host sleep handshake with
CPU1 as before. For other wakeup sources, skip host sleep handshake.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2025-06-18 09:30:28 -04:00
Kapil Bhatt
1037a0cca6 drivers: nrf_wifi: Add Kconfig for Dynamic Bandwidth Signalling
Add Kconfig to enable/disable  Dynamic Bandwidth Signalling.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-06-18 11:22:25 +01:00
Gang Li
a5dd932314 drivers: wifi: add support for fetching inactivity duration
In SAP mode, need to fetch the inactivity duration.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-06-18 10:56:14 +02:00
Maochen Wang
736058de7d drivers: wifi: nxp: add download countryinfo
When set 'wifi reg_domain' CMD, need to create and download countryinfo
to sync driver and FW for embedded supplicant case

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-18 10:54:55 +02:00
Jukka Rissanen
5a9a39caf3 net: mgmt: Convert the mgmt API to use 64-bit masks
Instead of using 32 bit enum values for event numbers, convert
the code to use 64 bit long bit fields. This means that the
user API is changed to use 64 bit event values instead of 32
bit event values.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-18 10:54:44 +02:00
Benjamin Cabé
8d6316c5b7 drivers: nrf_wifi: put driver ops in flash
Add const qualifiers to the driver ops to save on RAM usage.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-17 16:12:44 +02:00
Jukka Rissanen
0e57844b2d drivers: wifi: esp_at: Bind DNS to device net interface
Make sure received DNS server information is bound to the
wifi network interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-06-17 16:08:56 +02:00
Keith Packard
ec38e9ef64 wifi/esp32: Fix overflow in SSID copy
In the previous code, strnlen could have returned WIFI_SSID_MAX_LEN, and
the following statement ensuring NUL termination would have written one
past the end of the array.

Replace this with code that ensures a NUL termination within the bounds
of the array and then use strlen to compute the length.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-06-17 16:06:21 +02:00
Xinyu Hong
95d945504d drivers: wifi: nxp: add channel load support
Add WIFI_CHANNEL_LOAD macro to support wifi channel load feature

Signed-off-by: Xinyu Hong <xinyu.hong@nxp.com>
2025-06-17 16:05:45 +02:00
Rex Chen
cc5b1477ff drivers: wifi: nxp: support monitor mode tx frame
Add WIFI_HOST_TXRX_MGMT_FRAME macro to support tx frame
in monitor mode.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-06-17 16:04:54 +02:00
Jérôme Pouiller
f6f6196cf0 drivers: wifi: siwx91x: Also update interface state on AP
It seems there is no functional impact, but it makes sense to also update
the state of the interface when AP is started/stopped.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-13 15:41:27 -07:00
Jérôme Pouiller
b0b197fd17 drivers: wifi: siwx91x: Fix SLAAC other configuration issues
The interface was properly set "dormant" on disconnect. However on startup,
it arrived in the system with "awake" status. Hence, some configuration
frames were sent before the interface was connected. Then, when the
interface was marked awake after the connection, the frames were not sent
again since the operational mode did not changed.

Therefore, Router Solicitations were not send, the Router Advertisements
were not received and the IPv6 address was not set.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-13 15:41:27 -07:00
Maochen Wang
02b5edd7d6 drivers: wifi: nxp: return error for unsupported AP bandwidth
Starting SAP should return failure, if the bandwidth is not supported
by the Wi-Fi chip.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-13 15:37:01 -07:00
Qiankun Li
f31a411770 drivers: wifi: nxp: Modify shim driver to support btwt changes.
Align struct wlan_btwt_config_t in shim driver
with nxp wifi driver.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-10 08:47:25 +02:00
Muzaffar Ahmed
918d76918f drivers: wifi: siwx91x: Fix TWT wake interval unit conversion
Fixed an incorrect TWT wake interval unit conversion (256 was
incorrectly swapped with 1024)

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2025-06-09 14:41:20 -07:00
Gang Li
6b62df129b drivers: wifi: nxp: add Kconfig for IW610
Add Kconfig NXP_IW610, NXP_IW610_MURATA_2LL_M2,
NXP_IW610_RD_USD

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-06-09 14:30:04 -07:00
Rahul Gurram
9781a3531f drivers: wifi: siwx91x: Handling data packets for AP mode
In the raw data send API, the interface was hardcoded
for client mode. Now, we determine the opermode and
pass the appropriate interface to the raw data API
based on the current opermode.

Signed-off-by: Rahul Gurram <rahul.gurram@silabs.com>
2025-06-04 15:51:07 -04:00
Arunmani Alagarsamy
28be2211f4 drivers: wifi: siwx91x: Correct handling of BSSID in interface status
This commit resolves incorrect results in the interface status response.
The parameter for `sl_wifi_get_wireless_info` has changed following the
HAL Silabs update to version 3.5.0.

In AP mode, the implementation now correctly uses the `mac_address`
variable instead of `bssid`.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-06-04 17:04:24 +02:00
Arunmani Alagarsamy
de6395d5d0 drivers: wifi: siwx91x: Handle error case in power save mode
Power save is not supported in AP mode. This commit ensures that
`-EINVAL` is returned instead of success, preventing incorrect behavior.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-06-04 17:04:24 +02:00
Jordan Yates
3d7979ea4a drivers: wifi: nxp: auto NXP_WIFI_SOFTAP_SUPPORT
Automatically enabled `NXP_WIFI_SOFTAP_SUPPORT` if the application
specifies it wants AP support.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
53cf5ff576 drivers: wifi: esp32: auto ESP32_WIFI_AP_STA_MODE
Automatically enabled `ESP32_WIFI_AP_STA_MODE` if the application
specifies it wants either feature.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
90a2d0ec92 drivers: wifi: nrf_wifi: operation mode from application request
Default the operation mode from the application requested Wi-Fi
features, not the nRF70 part number.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Jordan Yates
7dbd36a222 drivers: wifi: options for application usage of Wi-Fi
The `CONFIG_WIFI` symbol currently covers a number of different
use-cases of Wi-Fi, primarily:
  * Wi-Fi AP (Broadcasting a network others can connect to)
  * Wi-Fi Station (Connecting to an AP + SSID scanning)
  * Wi-Fi AP + Station (Both the above)
  * Wi-Fi SSID scanning (SSID scanning only)

Each of these application usages of Wi-Fi requires a different set of
supporting options to operate correctly (`WPA_SUPP`,
`NET_CONNECTION_MANAGER`, etc), and different opportunities for resource
optimisation (System heap, buffer counts, etc).

Currently, optimizing the Wi-Fi drivers depends on driver specific
options, which can be challenging to find and are obviously not portable
across different drivers.

The addition of this choice allows applications to specify in a single
Kconfig option which features of Wi-Fi they use, and enable individual
Wi-Fi drivers to choose defaults based on those features.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-05-30 19:40:01 +02:00
Chaitanya Tata
5601af34b7 drivers: nrf_wifi: Rejig the statistics
Separate out host(local) and FW(remote) statistics and in case of a
FW statistics timeout, return success with a magic value in the FW
statistics, this way atleast host statistics would be handy for
debugging instead of sending failure up.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-05-29 12:07:09 +02:00
Marek Matej
c203760784 drivers: wifi: esp32: Add option for WiFi SPIRAM
Update kconfig to support SPIRAM.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-05-27 15:46:08 +02:00
Muzaffar Ahmed
ecaa19b71b drivers: wifi: siwx91x: Remove set credential for open mode
Removed the unnecessary set_credential API call in open security mode

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2025-05-27 11:51:17 +02:00
Nitin Pandey
21b20de1eb drivers: wifi: siwx91x: Fix passive scan bug
- Setting default value of passive scan
  dwell time of 400ms as SDK doesn't
  configure default value.

Signed-off-by: Nitin Pandey <nitin.pandey@silabs.com>
2025-05-26 14:17:30 +02:00