Commit graph

789 commits

Author SHA1 Message Date
Arunmani Alagarsamy
86cc0f99c8 drivers: wifi: siwx91x: Round up listen interval calculation
Use DIV_ROUND_UP to ensure listen_interval is rounded up instead of
being truncated during division by the beacon interval.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-09-11 09:55:13 +02:00
Arunmani Alagarsamy
b48cdc40fc drivers: wifi: siwx91x: Disable HT capabilities on channel 14
In the Japan regulatory domain, channel 14 is restricted to
802.11b/g operation and does not support HT (802.11n) capabilities.
Disable HT capabilities when operating on channel 14 in AP mode.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-09-11 09:53:48 +02:00
Kapil Bhatt
e7d5d7e804 drivers: nrf_wifi: Disable VHT capabilities for softAP mode
Disable VHT (Wi-Fi 5) capabilities when building with softAP support
to ensure consistent Wi-Fi 4 only behavior across all channels and
frequency bands.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-09-05 17:11:01 +02:00
Benjamin Cabé
0132ea07fb doc: fix spelling errors tree-wide
fix some spelling errors in code comments and Kconfig helps

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-09-03 17:04:13 +02:00
Joel Guittet
7837f5e509 drivers: wifi: esp32: fix integration of connection manager
Connection manager doesn't depends on ESP32 Wi-FI AP+STA mode.
This modification fix integration of connection manager binding
in the Wi-Fi ESP32 driver.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2025-09-02 18:43:56 +02:00
Qiankun Li
e045e397e1 drivers: wifi: nxp: Set default bandwidth for softap
When params->bandwidth is 0, set it
as a default value(WIFI_FREQ_BANDWIDTH_20MHZ).

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-09-02 12:33:01 +02:00
Muzaffar Ahmed
d94b2fd4e4 drivers: wifi: siwx91x: Add support for definitive MFP config
Replaced the MFP config logic with dedicated getter and setter APIs

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2025-09-02 11:09:39 +02:00
Muzaffar Ahmed
42c065f9cc drivers: wifi: siwx91x: Add support for RTS Threshold
Implemented siwx91x_set_rts_threshold and siwx91x_get_rts_threshold

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-09-01 16:40:40 +02:00
Ajay Parida
092347cdb1 driver: nrf_wifi: TWT setup duration
Build time configuration option to set TWT setup duration.
If AP does not respond to TWT setup request for this period,
STA will timeout and report setup failure.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2025-08-26 11:34:45 +02:00
Arunmani Alagarsamy
06158853c3 drivers: wifi: siwx91x: Add support for regulatory domain GET
Added support for retrieving the regulatory domain information from
the siwx91x driver. Since the SDK does not provide a GET API for
region details, the driver now stores the country code and reuse
the configuration `sli_si91x_set_region_ap_request_t` to get the
channel information. This stored data is returned when a GET
operation is requested.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-08-26 09:38:05 +02:00
Arunmani Alagarsamy
eac7784574 soc: silabs: siwg917: Relocate country code mapping function
Moved the `siwx91x_map_country_code_to_region()` function
from the Wi-Fi driver source file to nwp.c.

This change prepares the codebase for upcoming enhancements
related to the regulatory domain GET operation.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-08-26 09:38:05 +02:00
Arunmani Alagarsamy
72a3f7e4c9 drivers: wifi: siwx91x: Add support for setting regulatory domain
Add support for configuring the regulatory domain (region code) to
ensure the device operates in compliance with local RF regulations.

The region must be set before the Wi-Fi interface becomes active
i.e., before scan or connection in STA mode, or before starting in
AP mode.

Since the SDK does not support setting the country code directly,
the driver maps country codes to region codes

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-08-26 09:38:05 +02:00
Kapil Bhatt
9fad784fb9 drivers: nrf_wifi: Add check for minimum RX buffer size
Add check for the RX data buffer size. It should be atleast 400 bytes,
anthing less than that scan fails.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-08-07 13:14:28 +02:00
Arunmani Alagarsamy
a9dd0c932d drivers: wifi: siwx91x: Support max TX power configuration via Device Tree
Add support for configuring the maximum TX power for STA and AP modes using
a Device Tree property (`max-tx-power`). If unspecified, the default value
is set to 31 dBm.

Signed-off-by: Arunmani Alagarsamy <arunmani.a@silabs.com>
2025-08-06 12:03:39 -04:00
Muzaffar Ahmed
ce6ef6ac95 drivers: wifi: siwx91x: Add support for link mode query
Mapped the link mode (wireless mode) from wireless info to the wifi
status API.

Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
2025-08-06 16:20:14 +02:00
Gaetan Perrot
13a6dc5391 drivers: wifi: nrf_wifi: add NULL check in parse_sband
Ensure event is not NULL before accessing its members in
nrf_wifi_parse_sband().

This adds a defensive check to avoid potential null dereference and ensures
the function returns early when event data is invalid (i.e., zero channels
or bitrates).

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-08-06 17:12:51 +03:00
Chaitanya Tata
1e5c8f75ae drivers: nrf_wifi: Fix the interoperability issues
With few APs we have seen unexplained disconnections and sending
keepalive often solves the problem, so, to fix interoperability reduce
the keepalive period to 30s.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-08-04 19:55:27 +01:00
Maochen Wang
22a05e6a4e drivers: wifi: nxp: update the TX data API
Update the TX data API to support distinguishing if this packet is from
net stack or from internal packet forwarding case.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-08-01 07:49:55 -04:00
Magpie Embedded
dec8a04508 modules: hal: infineon: Add Kconfig option for pullups in Wifi Host Driver
This option allows board configurations to specify how to set the SDIO
pull ups when the SPI bus goes to sleep, using the Infineon WHD.
This is a board specific value.

Signed-off-by: Magpie Embedded <magpieembedded@gmail.com>
2025-07-30 17:36:05 -04:00
Chun-Chieh Li
e9fee35b02 drivers: wifi: esp_at: fix AT+CIPSEND premature timeout
For TCP socket, this fixes AT+CIPSEND command with too short timeout.
ESP modem replies SEND OK/SEND FAIL dependent on network traffic
condition, so this timeout config changes as Kconfig option for being
configurable by user.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2025-07-30 17:35:30 -04:00
Chaitanya Tata
7fe693029f drivers: nrf_wifi: Fix the issue of delayed keepalive
Supplicant sends keepalive on timer expiry but due to driver + nRF70
delays it is delayed to the AP, meanwhile some APs disconnect due to
lack of keepalive.

Set the processing delay to 700ms (based on tests) to fix.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-29 11:24:44 -04:00
Maochen Wang
eeabf28d02 drivers: wifi: nxp: IW610 aligns with RW612's config
Keep IW610 kconfig same as RW612, as it has similar Wi-Fi FW.
Remove NXP_WIFI_CAU_TEMPERATURE as it's not used.
NXP_WIFI_MEM_ACCESS, NXP_WIFI_REG_ACCESS and NXP_WIFI_OWE should not be
enabled by default.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-07-28 08:45:21 -04:00
Kavita Sharma
006302dc99 drivers: wifi: nxp: add calibration config for IW61x
Added the below config to overide default calibration data and
select 2Ant Isolation.
NXP_OVERRIDE_CALIBRATION_DATA
WLAN_CALDATA_2ANT_HI_ISO
WLAN_CALDATA_2ANT_LO_ISO

Signed-off-by: Kavita Sharma <kavita.sharma_1@nxp.com>
2025-07-28 08:45:21 -04:00
Chaitanya Tata
40b7b87ad7 drivers: nrf_wifi: Fix defaults to avoid false recovery
In case of a busy environment and if STA is far, then we see many
retries for the frames that cause the RPU to be awake though host has
de-asserted wakeup_now signal, this leads to WDT interrupt and host
thinks that it has given sleep opportunity to RPU and initiates a
recovery.

To handle this, increase the sleep opportunity window to 5s to cover all
the retries, this solves the false recovery problem. While at it, also
increase the range, no reason to limit to lower window. And update the
help text with the warning about power consumption.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-28 08:34:49 -04:00
Ajay Parida
3e9b7cbeb4 drivers: wifi: Pass the connection type
Firmware needs to know the connection type to be established.
use the wpa_proto field to derive the connection type.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2025-07-25 17:03:38 +01:00
Ajay Parida
c70b3504bb net: l2: wifi: Configure BSS max idle period
Support to configure BSS max idle period at runtime.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2025-07-25 17:03:38 +01:00
Chaitanya Tata
be51ddcf08 nrf_wifi: Fix the DTS compat for nRF71
Use specific chipset for compat instead of a generic Series.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-25 07:50:09 -04:00
Chaitanya Tata
90717047e0 drivers: nrf_wifi: Fix deadlock in display scan and recovery
When running Zperf traffic + scan in the background eventual we hit a
deadlock:

 * sysworkq: recovery->stop_zep->vif_lock->hal_disable->wait lock_rx
 * nrf70_bh_wq: event_tasklet->lock_rx->disp_scan_done->
             disp_scan_res_get_zep-> waiting on vif_lock

The traffic triggers recovery (another bug) and conflicts with display
scan.

Fix by moving scan results processing to system workqueue instead of
doing it in the FMAC event callback context, this is how supplicant scan
also works.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-24 17:00:17 +01:00
Kapil Bhatt
0d4472ae44 drivers: nrf_wifi: Remove station mode from monitor mode
Monitor mode doesn't require station mode. Disabling station mode
require necessary changes to work monitor mode.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-07-22 19:36:37 -04:00
Pieter De Gendt
c5a2542ad9 drivers: wifi: esp_hosted: select NANOPB_ENABLE_MALLOC
Use Kconfig symbol instead of the manual definition.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-07-19 15:46:08 -04:00
Jordan Yates
79edfc0128 wifi: nrf_wifi: ignore interface if TX disabled
Automatically hide the nRF7x interface from the connection manager if
the TX path is disabled (scan only mode). This prevents function calls
like `conn_mgr_all_if_up(true)` from bringing up the interface which
can never result in a connection.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-07-19 15:35:31 -04:00
Kapil Bhatt
dd7413d269 drivers: nrf_wifi: Fix rpu recovery debug info
Rpu recovey debug stats are stored in hal_dev_ctx which is not
persistent in case of interface is brought down/up. Need to add
in nrf_wifi_ctx_zep and update before interface goes down.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2025-07-19 13:47:04 -04:00
Chaitanya Tata
001f34d84c drivers: nrf_wifi: Fix return codes for xmit
Return proper error codes for xmit instead of generic -1.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-19 13:44:58 -04:00
Gaetan Perrot
bac20e419e drivers: wifi: nrf_wifi: wifi_mgmt: remove redundant null check
Deleted a redundant check for 'rpu_ctx_zep' pointer after it was already
dereferenced.

Clarifies code logic in nrf_wifi_get_power_save_config function.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2025-07-11 16:32:06 -05:00
Marcin Niestroj
5e25a3e24a drivers: esp_at: fix net_if_get_by_iface() typo
s/net_if_get_by_ifindex/net_if_get_by_iface/

Fixes: 0e57844b2d ("drivers: wifi: esp_at: Bind DNS to device net
  interface")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2025-07-11 08:19:06 -10:00
Chaitanya Tata
e728f80416 drivers: nrf_wifi: Fix TX drop statistics
In case FMAC API fails, increment the TX drop counter, helpful in
debug.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-08 13:39:17 -05:00
Chaitanya Tata
4bd1d39c67 wifi: nrf70: Fix system work queue stack size override
Defaults cannot be overidden (even with configdefault extension), they
only work if the original symbol is defined after the override e.g.,
"drivers and then subsys/net" but for kernel symbols,the default value
overrides don't work due "kernel and drivers" order, the kernel defines
the original symbol with the default and then it cannot be overridden.

Move the kernel symbol override to the original definition to make it
affect. Else any sample that uses nRF70 but doesn't enable WPA
supplicant ends up with 1024 and crashes.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-07-01 19:04:00 -05:00
Qiankun Li
d5a9a0fa87 drivers: wifi: nxp: Fix embedded supplicant stations link mode issue.
The link mode of legacy staions is specifically
divided into Wi-Fi_1, Wi-Fi_2 and Wi-Fi_3.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-26 22:07:09 -05:00
Qiankun Li
26f4d9b551 drivers: wifi: nxp: Fix getting error stations twt capability issue.
When external station connects to soft ap,
fill ap_sta_info.twt_capable with external
station HE capability.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-26 22:07:09 -05:00
Qiankun Li
f1b781577e drivers: wifi: nxp: Fix embedded supplicant link mode issue.
1. When external stations connect to soft ap,
   Wi-Fi driver will send UAP_CLIENT_ASSOC event with data.
   nxp_wifi_wlan_event_callback will be called to process this event.
2. The data should include some basic station information
   but not only mac address of station.
3. Fill ap_sta_info with information of
   connected station but not soft ap self.
4. Fix: Wi-Fi driver send UAP_CLIENT_ASSOC event
   with basic station information.
5. Fix: ap_sta_info with information of connected station.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2025-06-26 22:07:09 -05:00
Jérôme Pouiller
ffebf73079 drivers: wifi: siwx91x: Assign variable on declaration
When a variable is assigned once, we try to assign it during the
declaration.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
8d1d8d2b86 drivers: wifi: siwx91x: Prefer WIFI_MAC_ADDR_LEN
The preferred way to reference the size of the MAC address is
WIFI_MAC_ADDR_LEN.

For consistency, replace ARRAY_SIZE(mac.octet) with WIFI_MAC_ADDR_LEN.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
2ae23f7c58 drivers: wifi: siwx91x: Do not set unused values
We avoid to assign unused values during declaration. Hence, the reader
knows that every value assigned are meaningful. It also allow compile to
raise true warning if a value is used uninitialized.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
0b8f7d85bc drivers: wifi: siwx91x: Uniformize error management
Usually, the exception are treated in a condition before the nominal
case:

    ret = f();
    if (ret) {
        return -EXXX;
    }
    ... nominal case ...

siwx91x_on_join_ipv4() and siwx91x_on_join_ipv6() didn't follow this
pattern.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
a89dc21a2b drivers: wifi: siwx91x: Uniformize declaration of 'interface'
sl_wifi_interface_t interface is always initialized with
sl_wifi_get_default_interface().

Let's assign the value during the declaration everywhere.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
56fb22fba8 drivers: wifi: siwx91x: Group ARG_UNUSED() after declarations
We want to avoid declarations after statements.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
db2472209a drivers: wifi: siwx91x: Align the ways errors are managed
Unify the way the error code are tested:
  - sl_status_t is an alias to an int. The compiler won't complain if an
    int is assigned or compared to a sl_status_t. In the other hand,
    "int" is well known to manage error code. So, just use "int"
    everywhere.
  - Always name the return code "ret"
  - Unless it is meaningful, test the value of ret against 0
    (SL_STATUS_OK is just a convoluted way to say 0).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
dd0afec087 drivers: wifi: siwx91x: Clean up included files
To avoid confusion, we prefer to only keep header files really used by the
source file.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-06-26 11:03:08 -05:00
Jérôme Pouiller
9cee7a1e57 drivers: wifi: siwx91x: Extract station related functions
siwx91x_wifi.c starts to contains to much code. Let' simplify it by
grouping all the station 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
5818738668 drivers: wifi: siwx91x: Extract Power Save related functions
siwx91x_wifi.c starts to contains to much code. Let's simplify it by
grouping all the power-save 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