Commit Graph

103668 Commits

Author SHA1 Message Date
Yassine El Aissaoui ad8b62413d soc: MCXW71: Add BLE support
- Add IMU regions
- Add HCI definition
- Add config when BT is enabled

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-17 09:45:42 +02:00
Yassine El Aissaoui 89709ee382 drivers: hci: Update NXP HCI driver
Add updates to support MCXW71
Add support if RX data are received in ISR context
Add support to set BT address using Vendor command

Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
2024-10-17 09:45:42 +02:00
Chaitanya Tata 9eedb6d7c8 drivers: nrfwifi: Fix build error
This crept-in due to bad merge conflict resolution.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata c08b846b47 samples: net: wifi: Enable nRF70 Util in nRF70 build
This ensures we catch basic issues in nRF70 util, which is handy in
debugging.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata cd736558ef drivers: nrfwifi: Fix build errors when Util is enabled
This path is disabled by default.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Ajay Parida 0ce5da6da8 wifi_mgmt: Add support for configuring PS exit strategy
If AP indicates the presence of buffered traffic, then it is up to the
STA to decide whether to stay in PS or come out of PS, add configuration
options that can be used at runtime to choose this.

This is tagged as "noup" because it's a backport and "fromlist" cannot
be used as it won't apply cleanly.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata d30161cd8b drivers: wifi: Fix mutex re-initialization
The mutex is used to protect RPU zephyr context which gets modified for
every interface down and up (including recovery), so, it was being
re-initialized but also used to protect down and up which is a bug.

Move the re-initialization to the driver entry so that it happens only
once and we can properly use the mutext for down and up protection.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata ce9d71c476 drivers: wifi: Fix missing unlock for stats
The RPU context lock is not unlocked this is causing recovery to be
stuck waiting for the lock.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 67216f1b5a drivers: wifi: Fix crash when recovery is triggered
There is a race condition when recovery is in progress and in parallel
Wi-Fi util commands are being executed (CTF), where the RPU context is
de-initialized as part of recovery but no checks are present in the
Wi-Fi util command processing causing a crash.

This needs a proper fix for all commands, but for maintenance branch
fix is added only for commonly used commands.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Ajay Parida fe920fc9c9 drivers: wifi: Add PS exit strategy runtime configuration
Dynamically set power save exit strategy runtime configuration that
allows to switch b/w stratgies depending on conserving power and
low-latency traffic download.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata d0d659b675 drivers: wifi: Use mutex for spinlock
Ideally we should be using Zephyr spinlock APIs but that requires
changes to shim API, so, for this maintenance release just replace with
mutex to keep the context same and no API changes.

This solves the locking issue that we see when control and data path are
excited concurrently due to locking semantics of semaphores, the issue
is not root caused but mutex enforce strict locking semantics for
multiple threads and solve the issue.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 5f6dca377a drivers: wifi: Fix shell hang
Add a null check for HAL context in the interrupt handler, this was
causing locking issue operating on null. The root cause of null is not
known, but this solves the locking issue when data and control paths are
excited in parallel.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 7c3d342796 drivers: wifi: Add support for keepalive
To handle interoperability issue with few APs, add a feature to keep
sending keepalive frames periodically to avoid AP disconnecting the STA.

This is disabled by default to avoid unnecessary power consumption as
it's only seen with few old APs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 94f9fb95d9 drivers: wifi: Increase default PS active timeout interval
In crowded environments RPU is active for more than 10s due to too many
retries and this triggers a false RPU recovery. To avoid this, increase
the default to 50s to handle corner cases, as this will only impact the
recovery triggered case, higher timeout doesn't have any impact in
normal cases.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata dbda09d3e5 drivers: wifi: Enable management buffers offload
With this offload, host doesn't need to manage RX buffers for management
frames, and this saves Host-RPU comms and thus giving RPU to sleep more
often and is essential to test RPU recovery.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata a4537a7eea drivers: wifi: Add PS state debugs
These are very frequent, so, a separate debug is added for debugging
host RPU recovery logic.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 9c36d97646 drivers: wifi: Fix TX buffers leak
During interface down in case TX has pending buffers in either TXQ or
Pending_Q then they are not freed instead the Q itself is freed.

Fix by traversing the Q and freeing all members.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 5c8f1807c1 drivers: wifi: Fix RPU recovery disabled build failures
Fix RPU recovery protection to solve build failures when RPU recovery is
disabled.

As recovery is primarily based on power-management, add a Kconfig
dependency to enforce, this simplies the macros to protect the code.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 9b105698ed drivers: wifi: Add RPU recovery retry mechanism
In case RPU is stuck in consecutive recovery over a time period then
that means it's not recoverable through RPU recovery, only thing left to
do is to trigger a system reboot. This feature is disabled by default,
so, either application can do their own implementatio or enable this
feature in the driver along with configurable retries and window period.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 6f7fbf8451 drivers: wifi: Fix the NULL check
Check for RPU context as well.

To fix this properly we need more fixes to be backported, but this
should suffice for now.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata ed7c10ead3 drivers: wifi: Add quiet period for RPU recovery
This is to avoid successive recoveries in case we get successive
watchdog interrupts from the RPU.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata ce521b89ee drivers: wifi: Ignore parallel recovery requests
During recovery we might get further watchdog interrupts causing
multiple recovery requests, ignore them if a recovery is already in
progress.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata c1afe97e94 drivers: wifi: Increase the propogation delay
In order for the interface down to propagate and cleanup it needs more
time, using Shell 10ms was working due to human delay, but
programatically this needs higher delay.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 1e5db78afc drivers: wifi: Add support for separate debugs for RPU recovery
These are helpful for debugging RPU recovery only.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata a23184c473 drivers: wifi: Add a sanity check for RPU comms
Before proceeding with RPU bringup, do a sanity check by reading a known
signature to make sure the Host-RPU comms are operational.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 04ddd6d2b0 drivers: wifi: nrf700x: Ignore all failures in iface down
In case RPU is stuck and need a recovery, the failures in interface down
should be ignored as they are expected and we should proceed with device
removal that in turn removes power to the RPU.

TODO: This works for single VIF, but needs more thought for multi-VIF.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Chaitanya Tata 5ad7339311 drivers: wifi: Fix RPU recovery not being triggered
During watchdog (or any) interrupt processing, RPU accesses are being
made and they assert the wakeup_now flag this causes RPU recovery to not
trigger.

New false or true recovery detection algo:

 Check the time difference b/w last de-assert and assert, and if it
 exceeds minimum time needed for RPU to enter sleep, then not the
 timestamp. This timestamp will be used to compare when a watchdog
 interrupt is received and see if during the last window if host has
 given a chance for RPU to attempt sleep, if yes, then attempt recovery
 else ignore watchdog.

Also, add a Kconfig for the 10s active time that triggers recovery, this
needs to be passed to the FW (once we have enough patch memory).

Also, add a Kconfig for the minimum time needed for RPU to attempt sleep
in positive case.

Also, add a new _ms API for time stamp fetch, this is to avoid
precision loss when converting to and from ms to us and also makes code
readable by avoiding *1000 and /1000.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Andrej Butok e53eec0851 yaml: use EXTRA_CONF_FILE in .yaml files
Use EXTRA_CONF_FILE in sample yaml files,
that replaced deprecated OVERLAY_CONFIG
since the Zephyr v3.4 release.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-10-17 09:45:25 +02:00
Sylvio Alves 59f0418d2e soc: esp32: unify runtime heap usage
This commit applies several changes in the way "heap_runtime"
feature is used. It can't be split due to bisectability issues.

Whenever the feature is enabled, a new heap is created and
custom malloc/calloc/free functions are added into the build
system. Those functions are currently used for internal Wi-Fi and BLE
drivers only.

Such changes are described below:

1) Rename heap.c to esp_heap_runtime.c for better readability.
2) Rename RUNTIME_HEAP to HEAP_RUNTIME to make it similar to what is
available in Zephyr.
3) Add runtime heap to BT as such as Wi-Fi.

Fixes #79490
Fixes #79470

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-17 09:45:02 +02:00
Sylvio Alves 882ac1d088 drivers: esp32: wifi/bt: modify init call return error
Update both Wi-FI and BLE init codes to return proper
error code and logging when it is missing heap.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-10-17 09:45:02 +02:00
Valerio Setti 5e225e0c8b tinycrypt: deprecate the library
Since we now have PSA Crypto APIs/Mbed TLS alternatives for crypto
operations in all Zephyr's codebase we can start the deprecation
of the TinyCrypt libary (as planned from #43712).
This commit is only the inital step: updates documentation and
add the DEPRECATED Kconfig option to the TINYCRYPT one.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-10-17 09:44:53 +02:00
Tom Chang cbb322937f drivers: espi: npcx: support espi taf rpmc request
This commit adds support for handling espi taf rpmc requests.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-10-17 09:44:39 +02:00
Ibe Van de Veire e6dd4cda89 test: net: igmp: Add extra IGMPv3 testcase
Added extra testcases for the IGMPv3 protocol. The IGMP driver is
supposed to send an IGMPv3 report when joining a group.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Ibe Van de Veire ba9eca3181 net: ip: igmp: Add igmp.h for definitions
Add igmp.h file to declare definitions for IGMP that are not meant te be
included by the application but can be used in e.g. tests.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Ibe Van de Veire c646dd37e5 net: ip: igmp: Remove too strict length check
According to RFC2236 section 2.5, the IGMP message may be longer then 8
bytes. The rest of the bytes should be ignored.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Ibe Van de Veire f852c12360 net: ip: igmp: Fix wrong header length
The header length of the net ip packet was calculated using only the
net_pkt_ip_hdr_len function. The correct header length should be
calculated by adding net_pkt_ip_hdr_len and net_pkt_ipv4_opts_len. This
resulted in an incorrect IGMP version type in case of IGMPv2 message
(when IGMPv3 was enabled). The IGMP message was not parsed correctly and
therefore dropped.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
2024-10-17 09:44:33 +02:00
Marcio Ribeiro 3c82cd6585 openocd: esp32: gdb init command update
flushregs alias is deprecated, so it was replaced by the command:
"maintenance flush register-cache"

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-10-17 09:44:26 +02:00
Dominik Ermel 3e8ea52e21 tests/flash/common: Increase ztest stack size
The commit sets CONFIG_ZTEST_STACK_SIZE to 4096.

Fixes #79801

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-10-17 09:43:40 +02:00
Jukka Rissanen 8134673309 tracing: segger-sysview: Fix compilation issues with networking
The networking tracing function definitions were missing for sysview.

Fixes #79805

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-17 09:43:33 +02:00
Fabio Baltieri b23fea114d input: gpio_keys: add a no-disconnect property
Add a no-disconnect property that skips the call to disconnect the pin
during suspend, this is useful as not all gpio controllers supports pin
disconnection, and right now using the gpio-keys driver on one of those
results in a failed initialization if PM runtime is enabled.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-10-17 09:43:25 +02:00
Pieter De Gendt ca3dc019b7 scripts: Read yaml files using utf-8 encoding
By default Windows does not use utf-8 encoding for reading files,
set is explicitly.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-10-17 09:43:16 +02:00
Fengming Ye 9e8b7bd3ad modules: hostap: fix DPP build error
Fix DPP build error when HOSTAPD enabled and DPP disabled.
Guard hapd_dpp_dispatch in both CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
and CONFIG_WIFI_NM_HOSTAPD_AP.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-10-17 09:43:08 +02:00
Maochen Wang 4af697ad6b net: l2: wifi: fix AP sets band failed with channel 0
Should support setting band for both STA and SAP mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-10-17 09:42:59 +02:00
Phi Bang Nguyen 829c03bcdc runners: jlink: Fix NoneType object error
The commit 221199e15b presents a bug that
makes west flash failed with error.

AttributeError: 'NoneType' object has no attribute 'startswith'

In function is_tunnel(), tunnel may contain None and has no attribute
"startswith". Fix it.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-16 20:53:31 +01:00
Aleksander Strzebonski 18fb3f9a32 usb: dwc2: Allow for enabling USB if the cable is disconnected
Adds CONFIG_UDC_DWC2_USBHS_VBUS_READY_TIMEOUT_MS that allows
for waiting for a USBHS VBUS ready event for a specified
amount of time. Earlier it waited forever and because of that,
the udc_enable() was blocked forever if the USB cable was
disconnected. Now the function returns error on timeout.

Signed-off-by: Aleksander Strzebonski <aleksander.strzebonski@nordicsemi.no>
2024-10-16 16:37:31 +01:00
Jamie McCrae ef45434690 boards: nxp: imx8mp_evk: doc: Remove stray PINCTRL reference
Removes a reference to PINCTRL in a defconfig file, which has
been removed

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae b5b335ef6e tests: drivers: build_all: eeprom: Add nrf9131ek Kconfig fragment
Adds a Kconfig fragment which changes the MFD init priority

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae 3e8b769577 boards: ruuvi: ruuvitag: Remove setting PINCTRL
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae fb62ac0220 boards: vcc-gnd: yd_stm32h750vb: Remove PINCTRL
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00
Jamie McCrae 6ec63d4424 boards: ezurio: rm1xx_dvk: Remove setting PINCTRL
Removes setting this Kconfig in the wrong place

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-10-16 16:37:12 +01:00