In case a non-readable resource gets updated (either by the server or
with an API), it makes no sense to send a notification in such case, as
no such resources are not included in notifications anyway.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Adds length defines for all provisioning PDUs and uses them to split
prov_link.conf_inputs into separate fields.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Opened directory descriptor is leaked when returning 1. Fix that by
utilizing goto in function return path.
Fixes: 6b18e6992d ("subsys/loggin/log_backend_fs: added recovery after
file lost")
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Add guards to the structs. This has two purposes:
1) Reduce size of only one of them are enabled
2) Fix a compile issue if only one of them were enabled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add guards to the structs. This has two purposes:
1) Reduce size of only one of them are enabled
2) Fix a compile issue if only one of them were enabled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If either AICS or VOCS clients were not enable, then the VCS
client could not be enabled as there was a compile error
in the function that registered callbacks.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Even though it's highly unlikely that a component of time
would ever approach INT_MAX, use the unsigned specifier to mitigate
any unexpected behaviour.
Fixes#36814
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Flag that indicates if a given packet is being retransmitted has become
obsolete since more detailed flags were added. This commit removes the
flag and references to it altogether.
Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
Fix HCI Reset Command from asserting when there is pending
connection creation requested on coded PHY.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing initialization of legacy advertising PDU length
when advertising sets are reused between extended and legacy
advertising modes.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use CONFIG_BT_CTLR_BROADCAST_ISO when CONFIG_BT_CTLR_ADV_ISO
or CONFIG_BT_CTLR_SYNC_ISO Kconfig option is supported.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added Bluetooth Specification references to the
implementation of Channel Selection algorithm #2 in the
Controller.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Implement the functions required to calculate the SubEvent 1
and SubEvent n mapped channel indices.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add the check for mixed use of Legacy vs Extended HCI
commands for Periodic Advertising related HCI commands.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix extended advertising report to set the directed bit in
the event type when receiving directed non-connectable
advertising.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix extended advertising PDUs seen after the advertising
duration has elapsed, by considering the events skipped
due to overlap with other events which is provided by
the ticker lazy parameter.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add checks for invalid PHYs supplied to HCI LE Extended Scan
Parameters and LE Extended Create Connection commands.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Newline character is automatically appended in log backends such as
UART, so there is no need to add it explicitly.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
There is '%u' and '%d' in format message, while there is only one
argument (besides format string). Remove ununsed '%u' to stop printing
garbage.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
FS backend is no different when it comes to producing human readable
timestamp. Allow to select it when FS is the only enabled logging
backend.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
The len argument always has the same value as
usb_dev.setup.wLength, which is also the last received
USB device request.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
After extracting from ull_adv_sync_pdu_set_clear functions:
ull_adv_sync_pdu_alloc, ull_adv_sync_extra_data_set_clear
Use of ull_adv_ext_hrd_data structure became unnecessary.
The extra_data member of the structure was never used
due to separate function responsible for setting extra_data
content.
In all cases content for extended advertising header fields
may be passed to the ull_adv_sync_pdu_set_clear directly
as void * pointer, instead of pointer to ull_adv_ext_hdr_data.
This simplifies use of ull_adv_sync_pdu_set_clear as well
as removes unneccesary code to handle special structure type.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
extra_data is not used by ll_big_create and ll_big_terminate.
extra_data_prev and extra_data_new are optional arguments for
ull_adv_sync_pdu_alloc.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
ull_adv_sync_pdu_alloc function was extracted from ull_adv_sync_pdu_-
-set_clear function. The arguments list of ull_adv_sync_pdu_alloc
was derived from source function but the acutal functionality is
only part of what it was before.
The ull_adv_sync_pdu_alloc does not change extended advertising
PDU header fileds. The hdr_add_fields and hdr_rem_fields arguments
were used to allocate or not allocate memory for extra_data related
with new periodic advertising PDU. Also hrd_data pointer was
not used by the function.
The function arguments list was simplified.
New enum ull_adv_pdu_extra_data_flag was introduced to provide
named flags for extra_data memory management.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fix `poll()` handling for DTLS clients when the underlying socket is an
offloaded socket. As in this case no `k_poll()` is used underneath, it's
not possible to monitor the handhshake status with `tls_established`
semaphore. Instead, do the following:
1. If no handhshake is in progress yet, just drop the incoming data -
it's the client who should initiate the handshake, any data incoming
before that should not be processed.
2. If handshake is currently in progress, lift the `POLLIN` flag and add
small delay to allow the other thread to proceed with the handshake.
3. Otherwise, just proceed as usual.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The TLS/DTLS handshake in most cases is a blocking process, therefore
the underlying socket should be in a blocking mode to prevent busy
looping in the handshake thread. Fix this by clearing the O_NONBLOCK
flag on the underlying socket before the handshake, and restoring it
afterards.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Fixes#36667
If you had a single log file with index 0 created and you reboot
the log backend wasn't counting it and was overwiting it.
If you filled that file up before rebooting then it worked as
expected, creating a new file at the next index on each boot.
Signed-off-by: Elliot Revell-Nash <elliot.revell-nash@wdtl.com>
Implementation of the backend for IPC Service.
Multi-instance RPMsg was used as a backend.
Signed-off-by: Marcin Jeliński <marcin.jelinski@nordicsemi.no>
IPC Service allow plugging in different transport backends.
Specifies a generic API that is implemented by the backend.
Signed-off-by: Marcin Jeliński <marcin.jelinski@nordicsemi.no>
This patch implements a service that adds multiple instances
capabilities to RPMsg.
Each instance is allocated a separate piece of shared memory.
Multiple instances provide independent message processing.
Each instance has its own work_q.
Signed-off-by: Marcin Jeliński <marcin.jelinski@nordicsemi.no>
Refactor Periodic Advertising time update function to use
caller supplied Periodic Advertising PDU to calculate the
time reservations.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Apply suggestions from code review, and change to using
BT_HCI_ERR_SUCCESS instead of returning 0.
Co-authored-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Extended and Periodic Coded PHY time reservation. The
define earlier used does not have calculations for Coded
PHY.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Implementation to update Periodic Advertising time
reservations when advertising data and/or CTE length is
updated.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add check for already enabled and started Periodic
Advertising when HCI LE Set Periodic Advertising Parameters
command is called.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor out Periodic Advertising time calculations so that
it can be reused when PDU length is updated as part of
advertising data updates.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Implementation to update Extended Advertising time
reservations when advertising and scan response data are
updated.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Export the function calculating the primary channel
advertising event time reservation, so that Extended
Advertising implementation can reuse it.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor out Extended Advertising time calculations so that
it can be reused when PDU length is updated as part of
advertising data and scan response data updates.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Implementation to update legacy advertising time
reservations when advertising and scan response data are
updated.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>