Commit graph

720 commits

Author SHA1 Message Date
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
Steve Boylan
37e39dee58 drivers: wifi: infineon: Add SPI support to AIROC driver
Added support for SPI in 4-wire and 3-wire configurations to
the Infineon AIROC WiFi driver (drivers/wifi/infineon).

Review changes:
Move DT_DRV_COMPAT to common header file
Correct board-specific preprocessor lines
Removed AIROC_MAP_COUNTRY_CODE
Move Pico W configuration details to devicetree
Use pinctrl to manage shared data/interrupt GPIO
Clean up bus selection in Kconfig.airoc
Make SDIO and SPI bus struct independent
Replace LOG_DBG with LOG_ERR
Remove functionally duplicate operation
Remove spurious Kconfig option
Minor cleanup in CMakeLists.txt

Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
2024-12-10 16:23:36 +01:00
Gang Li
79fdf4a254 drivers: wifi: nxp: set the maximum number of stations
Add support for setting the maximum number of stations.
Add support for setting AP bandwidth.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-12-10 11:09:09 +01:00
Maochen Wang
c007ac4577 drivers: wifi: nxp: add Wi-Fi thread configurations
Support configuring Wi-Fi threads stack size and priority through
Kconfig.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-10 03:16:11 +00:00
Chaitanya Tata
6b8546dd03 hostap: Fix build after upmerge
Latest hostap (through upmerge) has intdocued a separate data
structure for signal info, so, fix the build errors. Also, fix the
variable rename for current TX rate.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-12-05 17:08:25 +00:00
Jilay Pandya
874df8d15c drivers: wifi: winc1500: fix unchecked return value
- fix unchecked return value by void casting

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-05 07:44:35 +01:00
Bansidhar P.M
0aeb81d6b5 drivers: nrf_wifi: Restructure to carve out a new nrf70 bus lib
The nrf wifi drivers include code related to qspi/spi bus. This work
moves bus related files to a new nrf70 bus library which is now
independent of the core driver and facilitlates building applications
directly using the bus APIs, agnostic to enabling wifi configs.

Signed-off-by: Bansidhar P.M <bansidhar.mangalwedhekar@nordicsemi.no>
2024-12-04 14:15:13 -05:00
Kapil Bhatt
9a6fea353c drivers: wifi: Add RPU recovery info
Add RPU recovery information in wifi utils.
It helps to debug watchdog recovery.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-12-04 12:10:41 +01:00
Hui Bai
ae7613b2c9 wifi: add hidden SSID configuration support for SoftAP
Added hidden ssid support configuration for AP mode.

Signed-off-by: Hui Bai <hui.bai@nxp.com>
2024-12-04 12:09:59 +01:00
Kapil Bhatt
302683ef7f wifi: nrf_wifi: Remove duplicate Kconfig option
Remove NRF_WIFI_RPU_RECOVERY_PROPAGATION_DELAY_MS Kconfig
which was defined twice with different values.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-12-02 11:14:46 +01:00
Chaitanya Tata
b8cab9e144 drivers: wifi: Fix blobs handling
The blobs are now part of nrf_wifi module, and remove the manual check
and add verifying the blobs and their integrity using helper function.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
da26d02d63 nrf_wifi: Move shim files from driver to module
The shim files should be part of the Zephyr module directory within
Zephyr, as they are coupled with the module implementation which os OS
agnostic.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
459f972785 drivers: nrf_wifi: Remove OSAL code handling
This is now taken care by the Zephyr module shim.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
f7dc9f82d2 drivers: nrf_wifi: Fix the path to OSAL code
The OSAL code now lives in it's own repo nrf_wifi.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Chaitanya Tata
139ce48c8b nrf_wifi: Fix the directory name
Following the naming convention add an underscore and update path in the
maintainers file too.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-25 17:43:34 +01:00
Maochen Wang
30763cfc4a drivers: wifi: nxp: default use hostapd AP
For NXP Wi-Fi, default use hostapd based AP.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-11-25 08:30:38 +01:00
Yong Cong Sin
b1def7145f arch: deprecate _current
`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-11-23 20:12:24 -05:00
Hongquan Li
41e33573e8 drivers: wifi: esp_at: Fix serial receive interrupt can't exit
If a character is received immediately after modem_iface_uart_init called,
the modem_iface_uart_isr function will not read the data in the serial port
fifo register as the context has not been registered at this time,
which will result in the program not being able to exit the interrupt,
so the context should registered before the serial port is initialised.

Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
2024-11-21 20:12:00 +01:00
Valerio Setti
516886be1b mbedtls: MBEDTLS_ENTROPY_POLL_ZEPHYR default on if MBEDTLS_ENTROPY_C
As long as MBEDTLS_ENTROPY_C is enabled, Mbed TLS needs to
poll some entropy source to gather data that will then be
processed by CTR/HMAC-DRBG modules. This means that in most
of the cases, once MBEDTLS_ENTROPY_C is enabled then also
MBEDTLS_ENTROPY_POLL_ZEPHYR needs to be enabled. This was
done manually until now, as the long list of samples/tests
demonstrate.

This commit solves this dependency by defaulting
MBEDTLS_ENTROPY_POLL_ZEPHYR to on as soon as
MBEDTLS_ENTROPY_C is set. As a consequence, all manual
enablement of MBEDTLS_ENTROPY_POLL_ZEPHYR in samples/tests
are removed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-11-20 15:59:40 -05:00
Chaitanya Tata
f537cf311d drivers: nrfwifi: Remove passing unused flag
This flag is now unused in OSAL as it takes the input via the API.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-11-17 19:06:34 -05:00