Add support for use of FAKE_ENTROPY_NATIVE_POSIX as entropy
driver for the Controller on BOARD_NRF54L15BSIM.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This patch extends LLEXT shell commands with support for loading
LLEXT from a filesystem. Use of the command requires absolute path
to the llext file.
Example use:
`llext load_llext hello_world /lfs/hello_world.llext`
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Introducing `llext_prepare()` and `llext_finalize()` APIs
that are invoked and the beginning and the end of the `llext_load()`
function.
The purpose of these functions is to bring possibility of initializing
loader before it is used and uninitialize or clean up when
it is no longer needed. Both functions are optional.
The buffer loader has been aligned to methods introduced in the patch.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
By default, normal memory is set readable+writable and not executable.
Adjust those permissions according to each region:
LLEXT_MEM_TEXT --> K_MEM_PERM_EXEC
LLEXT_MEM_DATA, LLEXT_MEM_BSS --> K_MEM_PERM_RW
LLEXT_MEM_RODATA --> K_MEM_PERM_RO aka 0
This must be done only at the end of an LLEXT load operation as memory
needs to remain RW for reloc processing, etc.
And while at it, flush/invalidate the cache accordingly.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Changed NET_CONFIG_CLOCK_SNTP_INIT depends on to require
POSIX_TIMERS instead of the deprecated POSIX_CLOCK
Signed-off-by: Luca Arato <luca.arato@secomind.com>
Without this it is not possible to serve both IPv6 and IPv4
connections if service host is NULL.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Allow NULL host parameter when creating HTTP service. This means
that the socket is created without specifying binding address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add to_str functions for context, parental rating, active state,
codec cap freq, codec cap frame duration,
codec cap channel count and location.
The remaining values are just numeric values and does not
need a to_str function.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The function took the uri as a `char *` but is in fact
not a null terminated string so change the type to uint8_t *.
Add a check fro uri_len == 0 before doing uri_len - 1
Changed the found check to just check the first octet rather
than the more costly strlen.
Fixed the type of the iterator
Add a break in the loop as we only need to find one ":"
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
do a cold reboot by default if no option is provided
for `kernel reboot`, instead of requiring to
type `kernel reboot cold`.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Fix scan_update() implementation for missing flags clear
that prevented starting scanning after previous attempt to
start failed due to parameters being rejected by the
Controller.
Example, attempting to start coded PHY scanning with a
Controller implementation that does not support it can fail,
but attempting again without coded PHY scanning should
succeed.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The TBS client callbacks are just informative so we
provide the information to multiple listeners.
To support this for the long strings, the function
handle_string_long_read was refactored.
This also allows for multiple users of the TBS client.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When the encrypt state was changed via
bt_bap_scan_delegator_mod_src then we didn't set the bad
broadcast code correctly.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The function had marked the type as char *, but it was in fact
not a string but rather a uint8_t array.
Marked the type properly and added a cast when using it with
bt_tbs_remote_incoming.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The CAP commander used bt_audio_valid_ltv which required
BT_BAP_STREAM to be enabled, but the CAP Commander does not
need BT_BAP_STREAM to be enabled.
Moved the function to audio.c which is always compiled for
the CAP Commander, thus removing the requirement for
BT_BAP_STREAM and the accompanying bt_bap_stream.c file.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The UTF8 implementions for both client and server
both use the utf8 API which require CONFIG_UTF8.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The function had marked the type as char *, but it was in fact
not a string but rather a uint8_t array.
Marked the type properly and added a cast when using it with
strings.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the CAP stream callbacks so that the application
callbacks are called before the CAP initiator.
This allows the application to abort/cancel a procedure
before we send out any future request.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Ensure that leading zeros are present in the milliseconds field,
otherwise a milliseconds count of 35 will appear as x.35, i.e. 350
milliseconds. With this fix, it will appear as x.035.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This patch adds bindesc support for the build version values for the
kernel and application - BUILD_VERSION and APP_BUILD_VERSION.
The kernel's BUILD_VERSION can be overridden at build time.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Remove `const` qualifiers on fields in structures that are only created
or instantiated as `const`.
This if primarily for consistency, in the same way that `struct device`
fields and `device->config` struct fields are not additionally marked as
`const`.
Signed-off-by: Jordan Yates <jordan@embeint.com>
There is asignment from size_t variable to uint8_t variable in
nvs_al_size function that can trigger static analysis error.
The problem is fixed by changing the variable to size_t type
instead of uint8_t.
Signed-off-by: Andrej Trnkóci <andrej.trnkoci@nxp.com>
A bug was introduced when fb17d0e365 introduced host presence detection.
Panic_mode flag was added which indicates that RTT should work in
synchronous, blocking mode but it was not set when backend was switched
to panic mode.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Replace several bools in bt_aics_client with an atomic value.
Update how these values are modified so that we can better
prevent race conditions.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds missing checks for get_capabilities method not being NULL.
Fixes crash with netusb and possibly other drivers.
Signed-off-by: Maciej Panek <panekmaciej@outlook.com>
Select PINCTRL subsystem by drivers which require it.
Prevent the need from enabling this symbol at board or soc level.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This option switches support for multiple volumes on the physical drive. By
default (0), each logical drive number is bound to the same physical drive
number and only a first FAT volume found on the physical drive will be
mounted.
When this function is enabled (1), each logical drive number can be bound
to arbitrary physical drive and partition listed in the VolToPart[].
The VolToPart[] is expected to be provided by Zephyr application.
For example, 2 FAT partition on SD disk ("SD" index 3) in terms of Zephyr:
{3, 1} - mount point "/0:"
{3, 2} - mount point "/1:"
The mount points have to be numbered in this case.
Code example of mounting a second FATFS partition places on SD-card:
static FATFS fat_fs;
static struct fs_mount_t mp = {
.type = FS_FATFS,
.fs_data = &fat_fs,
.mnt_point = "/1:
};
/*
* 2 FAT partition on SD disk
* PARTITION.pd - Physical drive number. "SD" has index 3 in terms of
* Zephyr (see FF_VOLUME_STRS)
* PARTITION.pt - Partition (0:Auto detect, 1-4:Forced partition). So 1 for
* the first FATFS partition and 2 - for second.
*/
PARTITION VolToPart[FF_VOLUMES] = {
[0] = {3, 1}, /* "0:" ==> 1st partition on the pd#0 */
[1] = {3, 2}, /* "1:" ==> 2nd partition on the pd#0 */
[2] = {0, -1}, /* "2:" ==> 3rd partition on the pd#0 */
[3] = {0, -1},
[4] = {0, -1},
[5] = {0, -1},
[6] = {0, -1},
[7] = {0, -1},
};
fs_mount(&mp);
Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
The Kconfig option enables support for 64-bit LBA, which also allows
to enable GUID Partition Table (GPT) support.
Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
When calling bt_cap_initiator_unicast_audio_start on a set of streams
that are all in the streaming state we return early with -EALREADY.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This allows the procedure to work for streams in the non-idle state,
e.g. we can start one of more streams in the codec configured
or even enabling state.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This allows applications to modify the values set by an
existing unicast group, assuming that none of the streams in
the CIG has been connected.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Behaviour is unchanged for max_skip == 0
For max_skip > 0, use a slightly different calculation to ensure
we can pass LL/DDI/ADV/BV-28-C
Signed-off-by: Troels Nilsson <trnn@demant.com>
Ignores "command disallowed" if the host privacy implementation tries
to change the device's random address while scanning or initiating.
This is not allowed by spec. It's caused by scan_update() in scan.c.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
CONFIG_SOC_COMPATIBLE_* is not configurable but CONFIG_BT_LLL_VENDOR_* is.
This allows an alternate LLL to be built on nordic and OpenISA chips.
Signed-off-by: Félix Piédallu <felix@piedallu.me>
The logs for retransmission attempts for sending segments and ack
retransmission attempts for receiving segments were the same, making it
difficult to distinguish between them. This can be solved by adding
information to the log of ack retransmission.
Signed-off-by: Junho Lee <tot0roprog@gmail.com>
Using strncasecmp to match HTTP headers can give unexpected results when
the strings to be compared match up until the end of one string, but the
other string contains additional characters. This can result in falsely
matching a HTTP header value, for example:
strncasecmp("Upgrade-Something", "Upgrade", sizeof("Upgrade") - 1) --> 0
In this case we know that both strings are NULL terminated since one is
a string literal and we have just length-checked and explicitly NULL
terminated the other. So we can just use strcasecmp without a max
length.
Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
The lwm2m_check_buf_sizes() function was not checking resources of
type LWM2M_RES_TYPE_U16, which could lead to potential overflows
when writing larger data types into U16 resources. Add a case for
LWM2M_RES_TYPE_U16 to properly validate the buffer size.
Fixes#77016
Signed-off-by: Hyunsu Yoon <piedroconti@naver.com>
If IPv6 is enabled, the fixed size net_buf data needs to be
large enough so that the full IPv6 header with extensions
can fit to one net_buf packet.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When an LLEXT object uses symbols of another such object, it depends
on it. Such dependencies have to be tracked to prevent their
accidental unloading. Ideally we should be able to track arbitrary
numbers of such dependencies, but this is a bit difficult. In this
first implementation we use a fixed-size array, currently consisting
of 8 entries.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When deciding which sections to group together, only the low 3
section attribute bits are relevant, ignore the rest.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Using the immediate logging option from LLEXT modules requires
one more symbol export.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>