Remove CONFIG_GPIO from defconfigs for Infineon boards.
Applications, drivers will enable GPIO if need.
Added 'select GPIO' from spi/Kconfig.ifx_cat1
Added 'select GPIO' from wifi/infineon/Kconfig.airoc
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
Some spi drivers do not allow the send buffer
and receive buffer to be empty at the same time,
if this happens it will cause the spi to be unable
to communicate with the nrf7002, so add the receive
buffer for the discard byte in the spim_xfer_rx.
Fix#80686
Signed-off-by: Hongquan Li <hongquan.prog@gmail.com>
nRF70 recovery relies on power-management feature which isn't applicable
for SAP, so, we keep seeing false recovery causing interface restart.
Disabled recovery for SAP to fix the issue.
Fixes#81130.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
With the newly introduced settling time for PLLS, we are seeing a peak
performance drop of 3Mbps in Zperf benchmarks, and also other
performance tests are also impacted.
This settling time was introduced based on observations in lab and not
because of any real problem or bug reported, so, for now, use zero
settling time (same as earlier) till we fully investigate and understand
the impacts and need.
Fixes#80951.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This works because undefined macro in conditional is treated as zero,
but could end up choosing the wrong divider.
Fix the macro with the new name.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
With introduction of Raw modes, nRF70 driver now advertises get_c
onfig OP, but doesn't implement all types.
This causes problems two-fold with checksum calculations:
1. The "config" isn't uninitialized, so, every call returns differnet
values. So, for UDP header checksum would be done and
pkt->chksumdone would be set. But for IPv4 header checksum might be
skipped.
2. Even if we initialize to zero, then network stack gets all zeros
and calculates checksum by itself rendering offload moot.
There is another problem in #1, as there is only single flag for pkt for
all checksum, nRF70 driver sees this and tells UMAC to skip checksum for
the entire packet. The design isn't coherent, and should be converted to
communicate per-type checksum status (some are filled by network stack
and some HW).
But as nRF70 support all checksum offloads, advertise all types for both
RX and TX.
Upstream PR #: 80882
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
In case the driver UP fails, the FMAC context will be NULL, so, add a
NULL check in the DOWN.
Fixes a crash seen when working with unprogrammed OTP (no MAC) that
fails the interface UP.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
During secure association, if we get any data packets from the
networking stack (as we switch off the dormancy) then they will be
dropped till the 802.1x port is authorized, but with recent changes the
corresponding network buffer isn't freed causing a memory leak.
Handle this case and free the network buffer (Using an OSAL API though
it's Zephyr to avoid duplication and also getting access to "struct
nwb");
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Make sure all kconfig related to Wi-Fi is
in its driver area.
This commit also removes esp_timer_init() call
from Wi-Fi driver.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fix a set of warnings like:
drivers/wifi/winc1500/wifi_winc1500.c:332:25: error: cast from pointer
to integer of different size [-Werror=pointer-to-int-cast]
332 | SOCKET socket = (int)context->offload_context;
when int and void* do not have the same size, by casting the content
of context->offload_context to intptr_t which is whichever integer
size matches the pointer size.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Recent WPA supplicant changes have broken nRF regulatory support,
implement the new set/get country WPA supplicant ops.
WPA supplicant: Regulatory SET through WPA supplicant, GET is direct to
the driver
Scan only: SET and GET direct calls to the driver
Fixes#79916.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
The eswifi driver uses an integer to identify the socket used for each
connection, which must be cast to and from a `void *`. This causes
warnings on 64 bit platforms, as precision is lost when casting from a
`void *` to `int`. Use a `intptr_t` type to store the socket value to
resolve this warning. Also, fix a function signature for the `accept_cb`
to use `size_t` instead of `int` for the length
Fixes#80242
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The defines should explicitly be passed to nordic HAL as they dont' use
the CONFIG_ prefix.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add CONFIG_NXP_WIFI_BUILD_ONLY_MODE, which allows the NXP WiFi driver to
be built without a binary blob. The built application will not be
functional, but this enables continuous integration to run upstream.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
set_btwt API implementation is not complete. Remove the structure
definition and implementation from the NXP WiFi driver to fix a build
error.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
ap_bandwidth API implementation is not complete. Remove the structure
definition and implementation from the NXP WiFi driver to fix a build
error.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Though nRF7000 is a special Scan only chipset, scan only can work with
any nRF70 platforms, no need for this enforcement and we can keep things
flexible.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Fix couple of bugs in exit path:
- In case of calloc failure, return's without unlocking
- memory is freed outside lock, in case of a tiny window of race, this
can cause a crash when this function is called from two threads.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
During Wi-Fi connection UMAC sends an unsolicited regulatory change
event but the driver code always assumes that this event is solicited
hence doesn't free the memory for the event.
Fix this by dropping the unsolicited event as it's not supported yet.
Fixes#79733.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This adds promiscuous mode support functions into build for filter
operation when the configuration CONFIG_NRF70_PROMISC_DATA_RX
is enabled.
Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@nordicsemi.no>
This set of changes brings in promiscuous mode filtering support in
driver. Since, firmware would be unable to filter packets due to
connection issues, the filtering support for promiscuous mode is
moved to the driver.
Signed-off-by: Vivekananda Uppunda <vivekananda.uppunda@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>