RFC4330 section 10 states:
A client MUST NOT under any conditions use a poll interval less then 15
seconds.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
sdp matching_recs maybe filled with uninitialized record. if
sdp_svc_search_req come from remote with invalid max_rec_count,
which is greater than num_services, matching_recs would response
uninitialized record result.
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
ARM CMSIS 6 has different ITM and TPI register definition comparing
with CMSIS 5. Update the swo initialization to use CMSIS 6 defines.
For the Cortex-M cores which are higher than Cortex-CM7, the LAR
has been removed from ITM.
Signed-off-by: Aaron Ye <aye@ambiq.com>
Introduce a new Kconfig option CPU_CORTEX_A78 to enable support for the
Arm Cortex-A78 CPU architecture within Zephyr. This configuration can be
selected by boards or SoCs that utilize the Cortex-A78 core, enabling
architecture-specific features and optimizations as needed.
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Hide the mutex lock details inside a wrapper call, like done for the
device stack API. This is not used for the per-device lock of the host
stack which use a different mutex lock.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
In the while loop parsing descriptors, check that the descriptor is past
the end just before dereferencing it to check if it is seemingly valid.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Make the struct name match the device naming for ease of use, although
slightly longer name. Propagate the change to the subsystem, includes,
tests and samples.
Signed-off-by: Josuah Demangeon <josuah.demangeon@nordicsemi.no>
Commit 39cb574 changed the log level from LOG_DBG to LOG_ERR in
bt_le_adv_resume(). This causes the error log
"No valid legacy adv to resume" to appear during normal connection
establishment when using bt_le_ext_adv_start(), even though the
system is functioning correctly.
Revert the change to restore the original LOG_DBG level.
Fixes: #94954
Signed-off-by: Samuel Tsai <stsai@atmosic.com>
If the cmd fail to receive response (for example: timeout), the buf is
NULL, then need to callback the result.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
If pm action fails within put_sync_locked, usage count should be
reset to reflect the state of the device.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Add a CPU frequency scaling subsystem, allowing a policy
algorithm to control the frequency of a given SoC/MCU
automatically at runtime.
Implement a basic, "on-demand" policy algorithm which
iterates through the P-states supported by the SoC and
selects the first P-state where it's trigger threshold is
less than the CPU load.
The CPU frequency scaling subsystem does not currently
support SMP. The CPU load measurement can be made to support
SMP since statistics are measured from the scheduler.
Co-authored-by: Eric Hay <Eric.Hay@analog.com>
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
Implement CPU load measurement subsystem. The statistics
used to calcualte the load are taken from the scheduler.
Specifically, the number of cycles used by the idle thread.
Co-authored-by: Sean Kyer <Sean.Kyer@analog.com>
Signed-off-by: Eric Hay <Eric.Hay@analog.com>
Rate limit the get_recv_buf() callback from the application to
reduce system trash when buffer pressure gets high.
Signed-off-by: Victor Brzeski <vbrzeski@gmail.com>
Adds support for images signed with SHA512.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Used simple vlanX for vlan interface name. What interface the
vlan interface was attached to could be checked by "net iface"
or "net vlan".
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
There were two problems about vlan interface naming currently.
1. When there were more than 1 vlan interfaces. It's not able to
initialze name for all of them to same name VLAN-<free>.
2. When enabled vlan with tag, the name VLAN-xxx was used.
However we may need to support multiple physical interfaces
in the future. So, it's not able to use same name VLAN-xxx
either for same tag on different physical interfaces.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Add support for setting and getting the bearer provider
name. For now the name will be duplicated by the TBS
implementation, but will be optimizied in the future
so only one copy of the name exists.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The interface descriptor and its associated string descriptor are shared
between different speed configurations. Do not try to add a string
descriptor if it has already been added and the index is not zero.
Similar to commit ec851ba7c7
("usb: device_next: avoid false error logging in CDC ACM").
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
The `%.*s` format specifier expects an int so cast the size_t parameter
to int.
Fixes an issue spotted in CI for:
west twister -p native_sim/native/64 -s sample.net.dns_resolve.mdns
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add bt_cap_unicast_group_get_info to get information about
a CAP unicast group. For now this just contain the pointer
to the BAP unicast group, which then can be used with
bt_bap_unicast_group_get_info to get information specific
to BAP. The bt_cap_unicast_group_info struct can later be
expanded with any additional information CAP may add.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add bt_bap_unicast_group_get_info to get information
about a unicast group. In this first iteration the info
struct only contains the sink and source presentation
delay, but the info struct can easily be expanded on
later to contain more.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
BAP section 7.1 states that all streams in a direction shall
have the same presentation delay. To achieve this, we need to
store the configured presentation delay for a unicast group,
so that we can compare with the new presentation delay.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When the SHI driver receives data from the host and finds it is invalid
(due to a checksum error or an unsupported protocol version),
it currently resets the state machine, initializes the output buffer,
and waits for CS de-assertion. Upon CS de-assertion, the driver resets
the state machine and initializes the output buffer again. This commit
removes the first redundant reset and re-initialization in the function
`shi_npcx_bad_received_data()`, improving the driver’s efficiency.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Relax the radio packet pointer assignment deadline assertion
until access address being transmitted. The PDU buffer is
probably only needed just after access address is being
transmitted or received by the radio. This will give some
more breathing room for slow CPUs like in nRF51x SoCs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Renamed the static function `rtu_tx_adu` to `modbus_rtu_tx_adu`
for naming consistency with `modbus_rtu_rx_adu`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
add a wrapper function to read the number of bytes currently buffered
and pending for the next flash write operation.
Signed-off-by: Syver Haraldsen <syver.haraldsen@nordicsemi.no>
These types are useful for IoT deployments and should be available
thru the resolver interface to get the data. The SRV is especially
useful to find services on the local network when not using a dns-sd
deployment and just something like Avanhi or Bonjour.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
When resolving SRV records - the label might not be compressed so
the first entry into the net buf is the start of the name and a
period could end up at the start - ie. ".example.local" so only add
a period when the buffer is not empty.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
The enum will auto increment, so in debug the IP and DATA records are
negative numbers which initially made this look like an error, so just
push the expected good values to be positive numbers in case of a print
or something else would imply these are ok.
Signed-off-by: Charles Hardin <ckhardin@gmail.com>
There was an issue where terminating the BIG while in the
ISO connected callbacks could lead to continueing the loops
would cause access to cleared memory.
The simple solution to this is to simply prevent
bt_iso_big_terminate from terminating the BIGs while we are
processing the BIG HCI events.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The broadcast code was attempting to read from argv[1] instead
of argv[2] that actually contains the broadcast code.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add checks on the fs pointer passed through the api before using to
avoid causing an exception
Signed-off-by: Theis Mejnertsen <theismejnertsen@gmail.com>
zms_active_sector_free_space is documented to return -EACCES on fs not
mounted error but currently returns an usigned type size_t. This fixes
that by changing the return value into a ssize_t
Signed-off-by: Theis Mejnertsen <theismejnertsen@gmail.com>
Implement the function bt_cap_initiator_broadcast_foreach_stream that
allows users to iterate on all BAP streams in a BAP broadcast source.
This can be used to easily get references to other broadcast streams in
the same group.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Check that SegN is not 0. SegN = 0 is invalid as the first segment is
sent in Transaction Start PDU.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Instead of add BT_UUID_BROADCAST_AUDIO_VAL for either BAP or
CAP, we now only do it one place (in BAP). This can now be done
since the default_source.broadcast_id was recently added.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a broadcast_id field in broadcast_source so that it can be
lookup later, which is useful for doing broadcast assitant
procedures on a local broadcast source.
The broadcast ID is now created at the same time as the
broadcast source(s), instead at the time of retriving
the advertising data.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>