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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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#79490Fixes#79470
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
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>
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>
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>
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>
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>
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>
flushregs alias is deprecated, so it was replaced by the command:
"maintenance flush register-cache"
Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
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>
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>
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>
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>
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>