The cache_size and lookahead_size are set at compile time using the
CONFIG_FS_LITTLEFS_CACHE_SIZE and CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE values
from Kconfig, or from the cache-size and lookahead-size properties in a
'zephyr,fstab,littlefs' compatible in the devicetree. Those values are
also used to statically allocate buffers that are pointed at by the
read_buffer, prog_buffer, and lookahead_buffer members of the lfs_config
structure.
At runtime, when using a block device, the cache_size and lookahead_size
are updated to be multiples of the underlying block device's block_size,
which may make them bigger than the original size used to allocate the
static buffers. Log an error and fail the operation when this occurs.
Signed-off-by: Phil Hindman <phindman@xes-inc.com>
Added check where stream_flash_erase_page checks if requested
offset is actually within stream flash designated area.
Fixes#79800
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Removed the LE Audio specific definition and instead
refer to the value defined by iso.h as it is ISO/Core
that defines this size, and not BAP/Audio.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The bis_iso_qos.rx was missing in param sent in bt_iso_big_sync
Also, MSE = 0 is valid (fixed error check)
Signed-off-by: Lars Knudsen <LAKD@demant.com>
The NET_SOCKET_SERVICE_SYNC_DEFINE_STATIC() macro was changed
earlier but the compilation error was missed. Fixing the macro
call.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The value of err was not initialized to 0 prior
to calling shell_strtoul, which only sets err
on actual error.
Signed-off-by: Lars Knudsen <LAKD@demant.com>
As the socket service API is currently used by mutiple applications
(dhcpv4 server, dns, telnet), it should be marked as unstable,
according to the docs:
https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Removed the generation of broadcast id inside the stack. It is now up
to the application to generate this by itself. The CAP sample has
been modified to allow either a static broadcast, or a random one.
All of this is handled in the application.
Signed-off-by: Fredrik Danebjer <frdn@demant.com>
The 12-bit signed values for the results of PBR are a bit
cumbersome, so this adds a helper function to make it easier to work
with the HCI formatted steps.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Add unit tests for bt_le_cs_step_data_parse.
Also exit early (without calling the function pointer) if the next
step would seem to read out of bounds.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Add a generic function to retrieve any data based on an
assigned numbers type. This function can in theory be
used for any data type, and not just LE Audio types, but
since it relies on bt_audio_data_parse it was made
specificially for LE Audio.
The function can be used in cases where
bt_audio_codec_cfg_get_val, bt_audio_codec_cfg_meta_get_val,
bt_audio_codec_cap_get_val or
bt_audio_codec_cap_meta_get_val (or their derivation)
are not easily applicable due to the type constrainst.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Originally, the net_mgmt task priority is very low. Based on roaming
implementation, roaming is triggered in net_mgmt task. When running UDP
test while doing roaming, the net_mgmt task won't have much chance to
run and roaming can't be triggered.
Increase it to 3, which is same value of supplicant task.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Added new ops and events in glue layer to support roaming.
Added new flag WIFI_NM_WPA_SUPPLICANT_ROAMING to control roaming
feature.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
ZMS is the abreviation of Zephyr Memory Storage.
It is a storage developed to target especially the non erasable devices.
The new memory storage system inherit from the NVS storage multiple
features and introduce new ones :
* Inherited features :
- light key-value based storage
- cache for entries
- Wear Leveling of flash memory
- Resilience to power failures
* New features :
- cycle counter for non erasable devices (instead of erase emulation)
- Keys up to 32-bit
- Built-in support of CRC32 for data
- Small size data (<= 8 bytes) integrated within entries
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
Introduces the concept of ll_scan_aux_chain, that allows for
keeping track of several advertising chains with a minimal
overhead. This replaces using several scan aux sets each with
an associated ticker IDs
Only one ticker is used for following chains; This is achieved
by having the scheduled chains in a sorted list and restarting
the ticker when the first in the list expires
EVENT_DONE_EXTRA_TYPE_SCAN_AUX now includes a pointer to the lll
structure to identify which chain to flush (to avoid race
conditions)
New implementation is hidden behind a config for now (defaults
to off): BT_CTLR_SCAN_AUX_USE_CHAINS
Other minor changes:
- rx_incomplete node pointer was moved to ll_sync_set
- data_len removed from ll_sync_set (it uses the chains instead)
Signed-off-by: Troels Nilsson <trnn@demant.com>
This option allows using the pm_policy_latency* APIs to gather latency
requirements on systems that do not support PM (e.g. systems whithout
CPU idle states). Because the API has a subscription mechanism, it can
be useful to perform system-level adjustments based on latency
requirements gathered from multiple system components.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
policy.c has grown organically, it contained many independent pieces of
code. This patch splits each logical unit into its own C file, making it
easier to browse the code.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
The return values were not correct, and the parameters descriptions
were not too easy to understand.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Introduce deferred ACL Tx packet transmission setup by radio,
so that an enqueued ACL Data packet can be transmitted with
the shortest latency.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add defines for radio timer capture and compare indices used
in the nRF Radio HAL implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Generated PEM headers need to be created before we build the WiFi shell
when WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE is enabled, so add an
explicit dependency on the app target to be certain these headers are
created
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
The "wifi ap config" command uses the station interface via
net_if_get_first_wifi(), and should use the ap interface.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
The nRF54 and nRF92 chips has data cache, which means
the ICMsg and ICBMsg must be configured to follow required
cache alignment of the shared memory.
The `dcache-alignement` needs to be defined for that.
Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
Added helper functions to set and get broadcast name
for codec capabilities and codec configs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If we get an error/rejection from the CAP acceptor when
performing the Unicast Audio Start or Stop procedure then
we need to abort the procedure and let the application determine
what the next step is.
This change triggered a corner case when connecting to multiple
CAP acceptors as the CAP initiatior. This was also fixed as part
of this.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When the CIS for a BAP stream is not connected, we cannot truly
be in the disabling state (the only state the stop operation
can be performed by the unicast client).
The reason for this is that if the CIS is disconnected, then
the ASCS server shall transition to the QoS Configured state
regardless of whether it has received a receiver stop ready
command from the unicast client.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Changed dependency of the BT_BAP_SCAN_DELEGATOR to GATT_DYNAMIC_DB
from 'select' to 'depends on' and solved all loop dependencies
caused by this change.
Fixes#79108
Signed-off-by: Babak Arisian <bbaa@demant.com>
There was a kconfig option used in v1 logging to get clean
output in the immediate mode. It was lost during the transition
to v2 but Kconfig remained. Adding spin_lock to log processing
to ensure that log messages are not interleaved in the output
in the immediate mode.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The own_addr_type used for various HCI commands sometimes
had a BT_HCI_OWN_ADDR_* type value or a BT_ADDR_* type
value. Those are 2 different value spaces, and if the public
address types would ever change, it would start have incorrect
behavior.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add create_sink_by_name command that scans for broadcast sources
with BT_DATA_BROADCAST_NAME matching the name given to the shell
command.
Fixes#70837
Signed-off-by: Babak Arisian <bbaa@demant.com>
remove k_work related code and change
the argument of the callback to `struct net_socket_service_event`.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>