Commit graph

720 commits

Author SHA1 Message Date
Nitin Pandey
652c5f42ac driver: wifi: siwx91x: Fix scan params error for 5Ghz band
- Rejected non 2.4GHz band channels from Wifi-Scan.
- Overrode the WIFI_MGMT_SCAN_CHAN_MAX_MANUAL parameter to 50.
- Added check for wrong interface and invalid states

Signed-off-by: Nitin Pandey <nitin.pandey@silabs.com>
2025-03-13 10:49:03 +01:00
Chris Friedt
7ee9c01f54 drivers: wifi: nxp: do not use deprecated posix kconfig
Update NXP_WIFI_SIGMA_AGENT to use non-deprecated POSIX Kconfig
options.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-03-12 19:03:52 +01:00
Vivekananda Uppunda
48989e49ed drivers: nrf_wifi: Fix return value for getting current reg domain
It is observed that the regulatory domain API returns a failure
even when it has successfully completed its task. This change
addresses a minor fix to return the proper value to the user
when attempting to set the regulatory domain.

Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
2025-03-12 09:53:52 +01:00
Kapil Bhatt
928534455b nrf_wifi: src: Fix include file path
With recent code restructuring file name and path
has been changed in nrf_wifi lib.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-03-10 15:20:08 +01:00
Xinyu Hong
0c9b7eb9d4 drivers: wifi: nxp: Support wifi ap disconnect
For embedded supplicant case add process to
support wifi ap disconnect station.

Signed-off-by: Xinyu Hong <xinyu.hong@nxp.com>
2025-03-07 19:52:00 +01:00
Ravi Dondaputi
aa0cb68c6f drivers: wifi: Create dedicated mem pool for Wi-Fi driver
Create dedicated memory pools for Wi-Fi management and
data operations (defaults: 20KB for management and 130KB for data).
Setting Data pool to 110KB for non-Nordic SOCs to resolve
RAM overflows seen in twister runs.

Remove the `HEAP_MEM_POOL_ADD_SIZE_NRF70` hint since we are
creating separate heaps for driver and not allocating from
system heap.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2025-03-07 19:42:10 +01:00
Sylvio Alves
183b74c558 driver: wifi: esp32: fix send event when not connected
Make sure send event returns error when device is not connected
into STA or have AP mode in place.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-03-06 08:35:29 +00:00
Maochen Wang
e242c08aef drivers: wifi: nxp: fix the wrong security type print of WPA2
For embedded supplicant case, when connects to WPA2 AP, driver will set
the key_mgmt to 'WLAN_KEY_MGMT_PSK | WLAN_KEY_MGMT_PSK_SHA256', as mfp
is default WIFI_MFP_OPTIONAL. Therefore, when using 'wifi status' to
get the security type, when the key_mgmt is 'WLAN_KEY_MGMT_PSK |
WLAN_KEY_MGMT_PSK_SHA256', the security type should be
'WIFI_SECURITY_TYPE_PSK'.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-03-04 17:26:29 +01:00
rahul gurram
ae857a1585 driver: wifi: siwx917: Fix the return case gracefully
Freeing the buf when sl_wifi_send_raw_data_frame() api returns
the error instead of success

Signed-off-by: rahul gurram <rahul.gurram@silabs.com>
2025-03-04 12:19:01 +00:00
Arunmani Alagarsamy
c75fadbdeb drivers: wifi: siwx917: Set security configuration to default
- Updated Wi-Fi security configuration to use default, allowing
  the device to select the best available encryption.
- Removed unsupported security features.
- Replaced `WIFI_SECURITY_TYPE_SAE` with `WIFI_SECURITY_TYPE_SAE_AUTO`
  to enable automatic selection between SAE-HNP and SAE-H2E,
  as the device supports both modes by default.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-02-20 14:54:27 +00:00
Oskari Seppä
de91ecdc5f drivers: wifi: esp32: Fix AP-STA mode interface init order
Wi-Fi AP-STA mode fails on ESP32 due to incorrect interface
initialization. In AP-STA mode, esp32_wifi_init first sets the driver's AP
interface, followed by the STA interface. However, the driver initializes
them in reverse order, causing both to read incorrect device data and
resulting in a "Wi-Fi not in station mode" error.
This fix handles STA and AP initialization in separate functions and
checks for correct mode in esp32_wifi_status.
Tested on a custom ESP32-S3-WROOM-1-N4R2 board, where both STA and AP
can connect, send, and receive data.

Signed-off-by: Oskari Seppä <seppaoskari@gmail.com>
2025-02-18 18:37:49 +01:00
Rex Chen
8a814dd355 drivers: wifi: nxp: fix sap stations list shows empty in open mode
Start ap with open mode, external station connected to sap,
wifi ap stations list shows empty, because no
'WLAN_REASON_UAP_CLIENT_CONN' is received, skip add
station infomation to station list,so station list shows empty.
Fix issue by trigger this event with
'WLAN_REASON_UAP_CLIENT_ASSOC'in open mode.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-02-17 05:39:41 +01:00
Maochen Wang
2383a5f23c drivers: wifi: nxp: fix wifi stats cmd hang when net_if down
After net interface is down and the driver deinit, should not interact
with driver and FW when call the 'wifi statistics' CMD.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-02-17 05:39:28 +01:00
Rex Chen
fb8b28a9ec drivers: wifi: nxp: embedded supplicant support 11v BTM query
Add 11v BTM query implementation for embedded supplicant L2 cmd.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-02-14 19:40:09 +00:00
Arunmani Alagarsamy
9d64cb4186 driver: wifi: siwx91x: Add active and passive dwell time
This commit adds support for configuring dwell times for both active and
passive Wi-Fi scans. The dwell time specifies the duration the device
spends on each channel during a scan.

Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-14 19:14:08 +00:00
Arunmani Alagarsamy
2e668cfc1e driver: wifi: siwx91x: Add single and multi-channel scan support
This commit introduces support for single and multi-channel Wi-Fi scans.
The device can now scan one specific channel or multiple specified
channels.

Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-14 19:14:08 +00:00
Arunmani Alagarsamy
4ee4cc39a3 driver: wifi: siwx91x: Add configurable maximum BSS scan
This commit introduces support for limiting the number of BSS scan
results returned by the siwx91x Wi-Fi driver. If scan_max_bss_cnt is
specified, the driver will return up to the specified count of BSS
results. If not specified, the driver defaults to returning all
available results.

Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-14 19:14:08 +00:00
Arunmani Alagarsamy
271bb8b7b0 driver: wifi: siwx91x: Add direct ssid scan support
This commit introduces support for direct SSID scans The feature allows
the device to send the probe requests and listen the beacon frame on the
specified SSID.

Co-authored-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-14 19:14:08 +00:00
Rex Chen
302089f311 drivers: wifi: nxp: support set override calibration data
Add OVERRIDE_CALIBRATION_DATA macro to support set specific
calibration data.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2025-02-14 19:13:02 +00:00
Xinyu Hong
b1fe93e047 drivers: wifi: nxp: Fix wrong current PHY TX rate
For embedded supplicant case, fix current PHY TX rate is 0
always after STAUT connects to Ex-AP

Signed-off-by: Xinyu Hong <xinyu.hong@nxp.com>
2025-02-14 06:57:17 +01:00
Sylvio Alves
10860ecbba soc: espressif: enable Wi-Fi/Bluetooth SW coexistence mgmt
Update and enable Wi-Fi/Bluetooth software coexistence management.
This improves package handling and is recommended to be used
in high traffic scenarios.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-02-12 20:20:11 +01:00
Sachin D Kulkarni
5f69ab752b drivers: nrf_wifi: Fix compilation issues for SoftAP mode.
Fix compilation issues for SoftAP mode which were missed in the mode
specific code changes.

Signed-off-by: Sachin D Kulkarni <Sachin.Kulkarni@nordicsemi.no>
2025-02-12 20:18:47 +01:00
Abhinav Kulkarni
296f91a02a drivers: wifi: nxp: fix ap status ACS channel shown as 0
Update wifi ap status command to reflect acs channel correctly.

Signed-off-by: Abhinav Kulkarni <abhinav.kulkarni@nxp.com>
2025-02-12 12:23:35 +01:00
Fengming Ye
82bdc15b7e drivers: wifi: nxp: add ACS support for l2
Add ACS support in ap enable ops for embedded supplicant.
Channel set to 0 means ACS mode.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 12:23:35 +01:00
Fengming Ye
710231406e drivers: wifi: nxp: add support for soft AP disabled case
Add correct macro guard for soft AP only code.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 09:40:38 +01:00
Fengming Ye
4ffa27568d wifi: nxp: kconfig: decouple dependency of soft AP
Decouple dependency of CONFIG_NXP_WIFI_SOFTAP_SUPPORT.
Add wifi defconfig to set default kconfig options when soft AP
enabled.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 09:40:38 +01:00
Fengming Ye
f82de1ff09 drivers: wifi: nxp: add soft AP status for some fields
For embedded supplicant soft AP mode, add beacon period, DTIM period
and BTWT support status fields.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 09:40:38 +01:00
Fengming Ye
121c3f0d95 drivers: wifi: nxp: add wifi statistics support
Add support for wifi overrun count, beacon received and beacon missed
count.
Add support for wifi statistics clear.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 09:40:38 +01:00
Jérôme Pouiller
1544354862 drivers: wifi: Introduce SiWx91x WiFi driver
This driver allow to use Zephyr native IP stack or the IP stack provided
by HAL / WiseConnect.

The WiseConnect implementation may take advantage of the specific
features provided by the 917 (power consumption, speed,
validation...).

Some notable features are not available with this interface:
  - It seems Zephyr does not provide API to offload multicast membership
    management. User should be to directly call WiseConnect APIs
  - Support for ICMP frames is difficult. Note that WiseConnect
    automatically answer to ping request. It is just not possible to
    send ping requests and receive ping responses.
  - Zephyr and WiseConnect both support TLS offloading. However this
    patch does not implement it.
  - Reentrancy in the WiseConnect side is uncertain.

This implementation has been tested with samples/net/wifi/ (which relies
on subsys/net/lib/shell).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00
Sachin D Kulkarni
a6dfdb9b8c drivers: nrf_wifi: Use mode specific APIs
Update the nrf70 Wi-Fi driver to use the mode specific
APIs (as a precursor to enable combining modes as required).

Signed-off-by: Sachin D Kulkarni <Sachin.Kulkarni@nordicsemi.no>
2025-02-10 09:02:55 +01:00
Sachin D Kulkarni
922d207c59 drivers: nrf_wifi: Use mode specific data structures
Update the driver to use the updated mode specific
data structure names.

Signed-off-by: Sachin D Kulkarni <Sachin.Kulkarni@nordicsemi.no>
2025-02-10 09:02:55 +01:00
Gang Li
92dd07e51b drivers: wifi: nxp: add WPA2-PSK-SHA256 support for l2
Add WPA2-PSK-SHA256 security type support for embedded supplicant.
Convert wifi key_mgmt to zephyr security type.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-02-10 07:26:07 +01:00
Chun-Chieh Li
069d439119 drivers: wifi: esp_at: handle IP unquoted parsing with ESP-AT version <2.0
This fixes parsing error on AT+CIPDINFO with ESP-AT version discrepancy.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-02-07 10:25:35 +01:00
Chun-Chieh Li
d74cf047b1 drivers: wifi: esp_at: enable CONFIG_WIFI_ESP_AT_CIPDINFO_USE automatically
This fixes DNS resolve failure (CONFIG_DNS_RESOLVER) by enabling
CONFIG_WIFI_ESP_AT_CIPDINFO_USE (AT+CIPDINFO) automatically to get
peer ip-address and port, required by CONFIG_DNS_RESOLVER.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-02-07 10:25:35 +01:00
Marek Matej
6e6ab2f8ab soc: espressif: Remove ESP heap and use heap adapter
Remove ESP heap from the sources. System heap is default heap.
Use heap adapter layer to configure used heap.
Use MEM_POOL memory request config to Wi-Fi and Bluetooth drivers.
Update the Wi-Fi and BLE memory needs.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-02-05 17:49:54 +01:00
Jukka Rissanen
ae978de237 drivers: wifi: winc1500: Use strncpy instead of strcpy
The strcpy is unsafe so use strncpy and pass the ssid length
as a maximum amount of chars to copy.

Fixes #81917
Coverity-CID: 434719

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 14:09:59 +01:00
Jukka Rissanen
c28baf830d drivers: wifi: winc1500: Initialize wifi_scan_result struct
The wifi_scan_result struct needs to be initialized to 0 so that
the ssid gets properly null terminated.

Fixes #81971
Coverity-CID: 434570

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-01-30 14:09:47 +01:00
Eric Holmberg
de3ce03319 drivers: wifi: esp32: connect to highest signal AP
The station-mode channel scan method is currently set to WIFI_FAST_SCAN
which ignores the signal strength and connects to the first channel found
which may result in poor WiFi bandwidth.

Change the scan mode to scan all channels and connect to the channel with
the highest RSSI.

Fixes #84488

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2025-01-29 22:30:42 +01:00
Daniel Mangum
cfe7b44b80 nrf_wifi: fix CONFIG_NET_L2_ETHERNET endif comment
Fixes endif comment that erroneously pointed to CONFIG_NRF70_STA_MODE.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2025-01-24 11:00:47 +01:00
Jordan Yates
2e711aaf81 wifi: nrf_wifi: eliminate NRF70_SYSTEM_MODE_COMMON
This symbol now has the same meaning as `NRF70_SYSTEM_MODE`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-24 03:22:47 +01:00
Jordan Yates
d95de82b94 wifi: nrf_wifi: extract NRF70_SYSTEM_WITH_RAW_MODES
`NRF70_SYSTEM_WITH_RAW_MODES` is more accurately described as an
additional option on top of `NRF70_SYSTEM_MODE`, not as a unique
choice of `NRF70_OPER_MODES`.

This allows the elimination of multiple `NRF70_SYSTEM_MODE ||
NRF70_SYSTEM_WITH_RAW_MODES` dependencies.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-24 03:22:47 +01:00
Toon Stegen
ff76b12287 drivers: wifi: nxp: raise connect result event when failed
In case connection fails, the driver should raise a connect result event
to notify the user.

Signed-off-by: Toon Stegen <toon@toostsolutions.be>
Signed-off-by: Bart De Vos <bart.devos@verhaert.com>
2025-01-20 11:15:17 +01:00
Maochen Wang
6c45bdcddb drivers: wifi: nxp: support WPA3 enterprise in scan result
Support setting WPA3 enterprise security mode in scan result, i.e.,
Suite-B, Sute-B-192 and WPA3 enterprise only mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-17 04:26:53 +00:00
Maochen Wang
f7df2a7445 drivers: wifi: nxp: add WPA3 H2E/AUTO and mixed mode
Add WPA3 H2E/AUTO and mixed mode for STA and SAP in
NXP shim driver layer.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-14 13:24:30 +01:00
Gang Li
227f04a0ea driver: wifi: nxp: 11k neighbor request support for embedded supplicant
Add 11k neighbor request support for embedded supplicant.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-01-10 09:49:55 +01:00
Nicolas Pitre
46aa6717ff Revert "arch: deprecate _current"
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").

This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.

The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.

Hence this revert.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-01-10 07:49:08 +01:00
Chaitanya Tata
f8b3320c68 drivers: nrf_wifi: Remove unused macros
These are duplicates of nRF7o bus library.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-09 11:51:17 +01:00
Chaitanya Tata
f74ff15101 nrf_wifi: Build OSAL as a standalone library
Move the cmake file of OSAL to it's own repo and build as a standalone
library, this is porting friendly.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-09 11:51:17 +01:00
Andreas Ålgård
7e36b028a9 drivers: wifi: winc1500: Rename functions to avoid multiple definitions
Renamed socket functions to avoid multiple definitions in the HAL library

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2025-01-09 11:50:43 +01:00
Andreas Ålgård
fc7afc3178 drivers: wifi: winc1500: Set context state to connected
When we accept a message the context state should be set to connected

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2025-01-09 11:50:43 +01:00