Commit graph

789 commits

Author SHA1 Message Date
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
Andreas Ålgård
cb50748300 drivers: wifi: winc1500: Fix wifi module so that it is not held in reset.
The "nm_bsp_reset" is used to apply a hard reset to the WINC board by
setting CHIP_EN and RESET_N signals low,then after specific delay
the function will put CHIP_EN high then RESET_N high.
reset-gpio is however defined as active low , causing this function
to hold the wifi module in reset.

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2025-01-09 11:50:43 +01:00
Kapil Bhatt
3f6d78c26c drivers: nrf_wifi: Fix offloaded raw tx deinit API
The osal apis spinlock - take, release and bus qspi sleep
are trying to use ops after deinit. So removing osal deinit
for temporary workaround.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-01-07 08:09:18 +01:00
Triveni Danda
b01ac955c6 drivers: wifi: nrfwifi: Enable variable network configurations
Add variable network configuration control into the driver to optimize
RAM usage by default. The pool sizes are default, and tuning is left to
the applications or samples.

Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
2025-01-07 08:08:58 +01:00
Kapil Bhatt
c595e6c00a wifi: nrf_wifi: Add Kconfig option to disabling priority window
Add Kconfig option to disabling priority window for scan.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-01-03 10:02:10 +01:00
Jilay Pandya
8db97b5bf6 drivers: wifi: esp_at: fix null pointer dereference issue
fix null pointer dereference issue by checking if *sock is null or not

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-27 15:42:41 +01:00
Ajay Parida
0fb3707699 drivers: wifi: Configure number of BSS entries
Configure BSS entries to be displayed in scan result as
per the rssi order.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-12-21 15:04:38 +01:00
Chaitanya Tata
6eff676448 drivers: nrf_wifi: Add dependencies
Add the feature flag and required GPIO in DTS as dependencies to avoid
build failures.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-20 18:31:22 +01:00
Chaitanya Tata
624543e180 drivers: nrf_wifi: Add help for SR RF switch
Helps in understanding this switch usage better.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-20 18:31:22 +01:00
Chaitanya Tata
7e77d97916 drivers: nrf_wifi: Remove hardcoded prints
The GPIOs will vary depending on the platform.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-20 18:31:22 +01:00
Maochen Wang
9bb15251a8 drivers: wifi: nxp: remove SAP IPv4 address when stopped
Start and stop SAP, the IPv4 address is not removed, if then use STA
mode to connect to EXT-AP with same gateway address as the stopped
SAP, STA will not get the DHCP IPv4 address, as the DHCP offer packet
is dropped due to detect of IPv4 address conflict. Removing SAP IPv4
address when stopped SAP can fix this issue.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-20 10:19:03 +01:00
Sylvio Alves
74d4008cc1 drivers: wifi: make WIFI_BUILD_ONLY_MODE global symbol
Convert vendor specific **_WIFI_BUILD_ONLY_MODE symbol as global
in order to provide common build flag to enable CI with no blobs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-12-18 18:17:16 +01:00
Hongquan Li
13ea58775b drivers/wifi/esp_at: Use mode 2 to connect when using as a UDP server
Mode 0 cannot establish a connection when used as a UDP server,
replace mode 0 with mode 2 to save the client's IP and port as
the communication address when a message is received.

Fixes #82898

Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
2024-12-18 15:31:55 +01:00
Qingling Wu
dbc6a50698 drivers: wifi: nxp: add set RTS threshold command support
Add set RTS threshold command support for sta and sap in nxp driver.

Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2024-12-18 10:17:24 +01:00
Maochen Wang
07328d962b drivers: wifi: nxp: Enable WIFI_NM for WIFI_NXP
Default enable WIFI_NM for both supplicant and embedded supplicant
case, to distinguish STA and SAP interface when use L2 layer.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-17 09:48:29 +01:00
Pisit Sawangvonganan
60a2888d0b wifi: esp32: enhance handling of AP connect events
This commit aims to improve the integration of `esp_wifi_drv` by
providing the link mode information to `wifi_mgmt` when a station device
is connected to the AP.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-16 13:10:29 +01:00
Rex Chen
0406f9b403 net: wifi: shell: add parameters for twt setup
Add two parameters for twt setup.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-12-16 13:10:02 +01:00
Rex Chen
a1f579a2f3 net: wifi: shell: add btwt feature support
Add btwt_setup cmd for sap.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-12-16 13:10:02 +01:00
Maochen Wang
7989a7bcce drivers: wifi: nxp: default select supplicant roaming
Default select WIFI_NM_WPA_SUPPLICANT_ROAMING in Kconfig.nxp, no need
to add it in .conf.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-16 13:08:59 +01:00
Maochen Wang
b4dc966e6e drivers: wifi: handle the WLAN_REASON_FW_HANG event
Handle the WLAN_REASON_FW_HANG event from Wi-Fi driver.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-16 13:08:59 +01:00
Maochen Wang
b80a083508 drivers: wifi: nxp: add Kconfig for packet forward
Add Kconfig for packet forward of SAP mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-16 13:08:59 +01:00
Maochen Wang
e34ad662eb drivers: wifi: nxp: Fix 11k build error
Fix build error when 11k is disabled.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-16 13:08:59 +01:00
Gang Li
3974260fe5 drivers: wifi: nxp: fixed bandwidth setting error
Bandwidth should be set when starting the AP.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-12-16 13:08:49 +01:00
Maochen Wang
b5b3c49365 drivers: wifi: nxp: fix getting Wi-Fi status
Fix getting SAP and STA status for non-supplicant case.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-16 13:08:37 +01:00
Maochen Wang
a419c141ea drivers: wifi: nxp: add heap for NXP Wi-Fi
Use HEAP_MEM_POOL_ADD_SIZE_ to add heap for NXP Wi-Fi. For supplicant
case, define less heap, as CONFIG_HEAP_MEM_POOL_ADD_SIZE_HOSTAP and
CONFIG_HEAP_MEM_POOL_ADD_SIZE_SOCKETPAIR are also enabled.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-16 10:53:21 +01:00
Triveni Danda
1b5c590ae8 drivers: nrf_wifi: Initialize TWT response parameters to zero
Set TWT response parameters to zero to avoid
uninitialized values and ensure correct behavior.

Signed-off-by: Triveni Danda <triveni.danda@nordicsemi.no>
2024-12-16 10:52:43 +01:00
Chaitanya Tata
a97f64011c drivers: nrf_wifi: Enable AP mode is supplicant AP is enabled
No need for an extra step to enable feature in the driver as it clearly
depends on the supplicant feature.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-13 21:51:02 +01:00
Fengming Ye
b9d7ce7c1c drivers: wifi: nxp: add split entity network for soft AP
Fix wifi connect and wifi ap start mix wifi network issue.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-12 11:05:02 +01:00
Fengming Ye
f193b5f9e3 drivers: wifi: nxp: support embedded supplicant
Fix uAP network issues when co-working with STA network.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-12 11:05:02 +01:00
Fengming Ye
002d3ad88c drivers: wifi: nxp: disable 80211R on embedded supplicant
Currently not support 11R on embedded supplicant.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-12 11:05:02 +01:00
Fengming Ye
4ad05aaec2 drivers: wifi: nxp: fix soft AP auto start
Fix soft AP net iface auto up after init.
Set dormant off/on when soft AP start/stop, to align with STA.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-11 21:36:19 +01:00
Fengming Ye
9f9325bd96 drivers: wifi: nxp: add cancel action wait ops
Add cancel action wait ops to cancel remain on channel after TX on
specific channel, in case we need to remain on another channel later.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-11 21:36:19 +01:00