Commit removes unused host hci custom functionality
that was moved to mesh by misinterpretation of it.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Print information which DNS servers were added by DHCP when
listing DNS servers in "net dns" command. This helps debugging
DNS server issues.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Remember which DNS server was added by a source like DHCPv4 or v6
message. This will allow system to remove DNS servers that were added by
that source. Then when stopping for example DHCP, we can remove those
specific DNS servers and not leaving DNS servers hanging in the system.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Use 64 bit values for accumulating idle time and measurement window
as it was possible to get overflow if window was long enough.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The QEMU RX doesn't allow to write value to IR flag,
There is also mentioned in RX HWM that the IR should
not be write 1 to. So we change the method to trigger
interrupt here is to call directly to SW irq table
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
This architecture is missing lots of support bits. Stub out this piece so
we can get more things building.
Signed-off-by: Keith Packard <keithp@keithp.com>
Previously, zms_read() could fill the buffer up to sizeof(rdname),
leaving no space for the null terminator, which could cause an
out-of-bounds write.
This change reduces the read size to sizeof(rdname) - 1 and appends
a '\0' manually, ensuring the buffer is always null-terminated safely.
Fixes: CID 516244
Fixes: #90533
Signed-off-by: sudarsan N <sudarsansamy2002@gmail.com>
- Issue: There is a bus-fault while accessing empty userdata structure
pointer if application does not include any include service
userdata instance (which consist of UUID list of included service)
but service array has defined dummy entry for it assumed to be
overridden by app during initial flow.
- For example, the issue has happened in case of tmap-central sample
without "CONFIG_BT_OTS" support. there are some MCS attributes
dependent on OTS service because of that
"BT_GATT_INCLUDE_SERVICE(NULL)" entry is added as part of service
definition. The given entry does not have userdata handler defined
and is expecting to be overriden by the app if it will be included.
During "bt_mcs_init()" call, "mcs.attrs[i].user_data" is not
populated with any attr-instance pointer. This makes CPU to access
null-address during reading local-database include-service attribute
which was not provided by the app but the include-service entry was
added to the db.
- Fix: Adding condition to check if user-data has null address, and
returning back to avoid any hard-faults.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
- Added a CPU load callback with threshold
- Changed cpu_load to use k_timer instead of k_work
Signed-off-by: Kristoffer Rist Skøien <kristoffer.skoien@nordicsemi.no>
When reading and printing hosname or domain name from DHCP options, we need
to skip the leftover bytes that do not fit into the provided buffers.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Tracing using Segger's SystemView works fine without enabling RTT_CONSOLE
(or CONSOLE, in general).
SEGGER_SYSTEMVIEW was automatically selecting RTT_CONSOLE, which prevents
applications from using another console backend (e.g. UART_CONSOLE).
Signed-off-by: Koen Van Herck <koen.v.herck@gmail.com>
The fallback to Bootstrap on a Registration Failure might not be desirable
for some applications. This change makes the default behavior configure
through Kconfig.
An alternative to configure "Bootstrap on Registration Failure" would be to
set the server object resource id 16 at runtime. However, this is tedious
and error-prone, as it will be reset when the server object is deleted and
might have to be set at different locations in the client code.
Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
If the next ticker is too close then hop over it when
rescheduling a ticker with drift in slot window is used.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The ISO C function time() should not depend on POSIX and this was
corrected recently via the common libc time() implementation.
Remove this dependency from the network subsystem where it has
been unduly needed for some time.
Similarly, XSI_SINGLE_PROCESS was a dependency for time() via
picolibc, because the time() implementation in picolibc relies
on the POSIX gettimeofday() call.
However, since Zephyr's common libc time() implementation no longer
depends on that, it can be removed as a dependency in the network
subsystem as well.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
pm_device_runtime has inconsistent behavior regarding
getting and putting a device's domain. This commit
aligns it to get the domain only once, once device
is resumed, and put only once, once device is
suspended.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add a missing assignment of the return value of zms_write() to rc
variable so that potential error is actually checked and returned.
Fixes CID 524778
Fixeszephyrproject-rtos/zephyr#90474
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The command buffer was incorrectly encoded due to the recent change to H:4
encoding. Instead of fixing the header offset, just use the newly
introduced bt_hci_cmd_alloc() API, since that takes care of correctly
encoding the command header when it gets sent.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Introduce a new bt_hci_cmd_alloc() API which only allocates a command
buffer and reserves sufficient headroom for H:4 and command headers, but
doesn't actually encode any of those headers into the buffer. Additionally,
modify bt_hci_cmd_send() and bt_hci_cmd_send_sync() so that they handle
such buffers and perform the header encoding correctly. To avoid
duplication, bt_hci_cmd_send_sync() now builds upon (i.e. calls internally)
the bt_hci_cmd_send() API.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
GDB can now also be built without UART support, e.g. on Xtensa it can
use a memory window backend. Update the Kconfig dependency to avoid
build failures.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add a Kconfig option to be able to postpone entering the GDB stub
until an external trigger.
Signed-off-by: Noah Klayman <noah.klayman@intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
All debug window slot indices should be defined in
adsp_debug_window.h, move them there and use them consistently.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Fix incorrect aux offset value in the aux pointer in the
primary advertising channel PDUs when using single timer
tIFS switching feature in nRF54Lx.
End time was not captured when only Tx follow by Tx happens
in the primary advertising channels. End time needs to be
always captured when using single timer so that elapsed
packet timer value is correctly accumulated, for use to
setup subsequent radio transmission or reception inside the
same radio event.
Relates to commit 373dc0db71 ("Bluetooth: Controller:
Single timer use Extended Advertising nRF54L support").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Do not clear timer clear subscription until the radio event
is done. This is required for single timer switching when
periodic chains are to be received by LLL scheduling. Each
PDU in the train requires the timer to be cleared when the
parent PDU has been received such that reception of
auxiliary PDU's radio_tmr_start_us() can use the relative
offset since last PDU reception.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use defines for Transmit/Receive and Inter-frame spacing
related Radio End events. This will ease some spaghetti of
conditional compilations for single timer and direction
finding support.
Direction Finding is not yet supported when using single
timer software tIFS switching.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fixup commit 031a17c271 ("Bluetooth: Controller: Align
DDPI usage with nRF54L power domains").
Align DDPI usage with nRF54L series power domains and
available DDPI configurations.
Use indices below 4 when needing to bridge with GPIO,
use indices below 8 when needing to bridge with MCU domain
like CCM and AAR; and use indices above 7 to bridge with
Peripheral domain.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>