Fix Extended Advertising conditional compiles in header files.
Do not conditional compile declarations, definitions of
functions in source files only be compiled out.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix to include ll_adv_cmds_set when broadcast role is not
enabled in the Controller but advertising extensions is
enabled (Extended Scanning is used).
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
A previous commit fixed OpenThread logging when `LOG=n`, but
introduced regression when `LOG_MODE_MINIMAL=y`. This commit
fixes the latest.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
This commit utilizes psa_crypto_get function to fetch cryptographically
secure pseudorandom numbers.
Signed-off-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
Add a new API call to replace nvs_init: nvs_mount. The new API does the
same as nvs_init except that it assumes to be provided with a valid
flash device via `struct nvs_fs` `flash_device` field. Previously, it
was not possible to avoid the runtime overhead of device_get_binding()
even if the flash device was known at compile time.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
sys_le16_to_cpu is a macro, and not big endian the value
is referenced twice, which would incorrectly increment the
value.
Modifed to extract the value to a variable before calling
sys_le16_to_cpu.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of relying on a single globally increasing (but never
resetting) packet_sequence_number, it is now correctly
reset and incremented for each ISO channel.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adding the same BT callback struct twice can cause
an infinite loop when iterating the callback_list,
so register the gatt callback just once early.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
Rename the use of mstr word in advanced scheduling
implementation to cen as a representation for Central
role.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use connection interval units of 1250 us for periodic
scheduling of Extended Advertising auxiliary PDU events so
that auxiliary events can be periodically grouped alongwith
the Periodic Advertising Events. This will permit
mitigating overlaps amongst them.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add implementation to find free slot after Periodic
Advertising event, to place the BIG event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Make the Periodic Advertising time reservation calculation
function internal public so that advanced scheduling can
use it to scheduling the BIG event after the Periodic
Advertising radio events.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor the implementation to get free slot after a
state/role so that it is easy for reused for scheduling
Broadcast ISO events.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix scheduling of Periodic Advertising events to be after
the group of Auxiliary set events. Do not reduce the slot
offsets as time reservations in ticker for non low latency
variant of controller does not include the slot offsets in
the reservation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor the implementation to get free slot after a
state/role so that the code depth is reduced.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Extended the connection parameters negotiation procedure used in the
SMP BT module. From now on, it is possible to configure a preferable
set of all connection parameters to be used during the image transfer.
The default values are optimized for transfer throughput.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Guards the `recv` callback for just unicast and broadcast sink
builds, and removes the usage of it in broadcast_source.c
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The callbacks were implemented to notify the application
about the state of the ISO. However, since then, callbacks
such as `started` and `stopped` have been implemented,
and as such the `connected` and `disconnected` callbacks
no longer server any purpose.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add `ing` to the `BT_L2CAP_CONNECT` and `BT_L2CAP_DISCONNECT`
states, so that the name better matches the actual state.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This adds a utility function to check if an address is within
read only section. This is extracted from logging subsys so
use the new func in logging. The one is cbprintf_packaged is
also replaced.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
XCC is based on GCC 4.2.0 which doesn't support auto type.
So force CONFIG_LOG2_ALWAYS_RUNTIME to be enabled if XCC is
being used.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Make it possible to "finish" with fewer bytes than what was "claimed".
This was possible before on the get side, but the put side was
cummulative wrt finish. The revamp made it cummulative on both sides.
Turns out that existing users rely on the opposite behavior which is
more logical and useful. So make both sides that way.
Adjust documentation, test case and users accordingly.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
No SoCs are re-implementing the constraints API. This _feature_ was
mostly put in place to cover TI platform needs, but it is no longer
needed. Refer to previous commit for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Makes possible to read a single resource instance at a time with
plaint text, JSON and TLV content formats.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
The L2CAP channels were removed from the bt_conn channels list. They
were thus not found in the ecred connection response handler.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
We keep the behavior for legacy advertising data as the controller will
ignore such scenarios when using legacy advertising commands.
Extended non-scannable advertising sets don't support scan response
data. Extended scannable advertising sets don't support advertising
data.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
No ring_buf_get_finish() should be performed on ring_buf memory that
wasn't claimed beforehand. Using ring_buf_get() with a NULL destination
does both the claim and the finish part without retrieving anything.
This is especially important with the ring_buffer revanp where the above
is enforced for proper operation.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The command.param may not always be set in send_command
depending on whether command.use_param is set.
If command.use_param is not set, the command.param is
not logged, and is set to 0.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If settings wipe fails we are not informed about this what can lead to
bugs which are hard to investigate.
This commit adds log and/or assert which is triggered by this failure.
Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
If the item has name but no help, there's no need to fill
shell with tabulators and colon at the end of the line.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
Adding mechanism to all the backends to switch the logging formats
at runtime while leveraging the function pointer table based upon
the Kconfigs which also cleans up the logging backend design.
Also demonstrate the working API with the changes
to syst sample. Clean up Kconfig for backends and add a standard
template to generate the Kconfigs for logging formats to be used
by all backends.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Add support for new API's log_backend_format_set and
log_format_set_all_active_backends to switch the logging format
for one backend and for all the active backends respectively.
Using format_set function pointer in log_backend_api struct as a hook
to set the log format at runtime in the backends. Add function pointer
table with helper functions to be used as a way to select log format.
Add supported log format types as macros to use with the API.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
LwM2M version 1.1 will select SenML Json for default content format.
Version 1.0 will use TLV format.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
LwM2M engine Send operation support /dp.
Send operation based on Composite Read functionality
which is not enabled at engine side like composite write.
Added Kconfig configurable for composite read path list size.
Created generic Read object instance which is shared between
general read and Composite Read operation.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
LwM2M SenML JSON contain format support for Read / Write operation.
Added Kconfig configurable for enable SenML JSON format.
LwM2m read validate read operation and report out of memory.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
Change the CPU_CORTEX_R kconfig option to CPU_AARCH32_CORTEX_R to
distinguish the armv7 version from the armv8 version of Cortex-R.
Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
Remove deprecated functions in the previous release. Note that PM API is
not marked as stable.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Aligning with the rest of PM API, replace pm_power_state_exit_post_ops
with pm_state_exit_post_ops.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fix Periodic Advertising PDU ACAD set and clear interface to
support updating ACAD when previous and new PDU buffer are
same (i.e. when previous new PDU not consumed yet by LLL).
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update implementation to have assertion when not finding the
Channel Map Update Indication field in ACAD.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In case an individual resource is being discovered, the LwM2M client
should not only fill the attributes assinged at the resource level, but
also the ones inherited from the object and object instance levels.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
LwM2M 1.1 allows to write attributes for resource instances as well.
Resource instance level attributes need also to be taken into
consideration when adding/updating observers.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
LwM2M adds Resource Instance reporting in Discovery response, along with
attributes assinged at the Resource Instance level.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Peer may send a zero-length keepalive message, probing the recv window
size - TCP stack should still reply for such packets, otherwise
connection will stall.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add implementation of net_tcp_update_recv_wnd() function.
Move the window deacreasing code to the tcp module - receive window
has to be decreased before sending ACK, which was not possible when
window was decreased in the receive callback function.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Move the unittest.cmake to the new Zephyr CMake modules dir.
This allows us to have a single Zephyr CMake package and load unittest
module as: 'find_package(Zephyr COMPONENTS unittest)'
This unifies the way Zephyr package is sourced and removes the need for
a dedicated ZephyrUnittest package.
Deprecate the use of: 'find_package(ZephyrUnittest)'
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
If OPENTHREAD_IP6_FRAGM is enabled the IPv6 fragments are handled in
OpenThread stack but also forwarder unconditionally to the Zephyr
uplayers. It causes additional packets processing and leads to errors
like unrecognized next header type or duplicate ping reply. What more
these errors generate additional traffic which jam channel and decrease
latency for packets required fragmentation.
This commit add filtering IPv6 fragments when data fragmentation and
reassembling is enabled in OpenThread.
Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
Uninitialized memory would report wrong value for
`mAckedWithSecEnhAck` flag in the received frame, making the
OpenThread stack to update the frame counter for the neighbor
wrongly.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
When immediate logging is used and optimization is off then bigger
stack is needed for thread analyzer. Adjusting the value.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Logging v2 is utilizing complex preprocessing operations to
prepare message at compile time. Multiple operations are peformed
on log message arguments. However, it is expected that argument
will be evaluated only once (e.g. it can be a call to a function
with side effects). Adding additional layer which creates copies
of user arguments on stack and passes them to further processing.
Updated test for log_msg2 which is using internal macro which
got renamed.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Always use runtime packaging in immediate mode. Removing attempt to
package on stack if possible. It would be done only to speed up
logging but that is not a requirement in immediate mode where
packaging time is fractional compared to backend processing. Using
runtime packaging also reduces stack usage in the context which calls
log message.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The commit adds FS_FATFS_MAX_ROOT_ENTRIES Kconfig option that allows
to select number of root node entries that will be allocated while
creating FAT file system on a device.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit removes redundant memcpy operations and switches from
using TinyCBOR provided byte order converters to sys_be, native
to Zephyr.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
When system clock is set globally for the test which is executed
on various qemu platforms it may happen that clock is set too
high compared to CPU clock frequency. In that case test may stuck.
Added check and test skipping in that case.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Updated log_core to use spin lock instead of irq_lock.
Refactored z_log_msg_post_finalize function.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This is a bare minimal changes to tell the server that we are using
LwM2M 1.1 version. Queue-mode parameter has changed between 1.0 and
1.1 so it must be changed in the same time.
Other 1.1 features may follow on separate commits. This is still
an experimental feature that allows developing and testing of
1.1 features.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
LE Audio builds on top of the BT Host stack, and will
thus require a higher amount of stack size. Even simple
applications using BAP will likely reach the 1024 default
size with the default BAP configurations, and when
we start adding CAP and even TMAP/HAP on top of it, it
will likely increase even further.
The default value of 2048 is unlikely to be reached,
and applications that want to optimize can likely
reduce it, depending on the configuration.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This far time values have been synonymous to integer values. Content
formats like CBOR do use different representation.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
As use for simple message with no-segment send or receive.
This will be useful for ram-resource-constrained device.
such as bbc-microbit-v1.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Remove the BT_AUDIO_DEBUG Kconfig option.
Given that all the audio modules are guarded by the BT_AUDIO config,
it seems excessive to also have a separate guard for audio module
debug. It is sufficient that this is turned on/off module by module.
Note that the BT_AUDIO_DEBUG was also located in the wrong file - the
babs Kconfig file, not the main Kconfig file.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
Remove the check for BT_AUDIO from the Kconfig files that had it, for
consistency (some files did not have it).
This check is not required - all Kconfig.* files are sourced from the
main Kconfig file _only_ if BT_AUDIO has been configured. As long as
this is the case, it is not required to check in the files themselves.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
Added support for Portfolio object support because LwM2M v1.1 conformance
test requirement that. This object is only for conformance test purposing.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
Before this change, enabling CONFIG_BT_SETTINGS and calling
settings_load(), but delaying / not calling bt_enable would trigger an
assertion error due to a timeout. The fault is that the settings load
handler for the Bluetooth host assumes bt_enable has already been called
and sends HCI commands to the controller. This times out if HCI is not
running.
The fix is to skip loading Bluetooth settings before bt_enable. The doc
is updated to guide the user on how to enable Bluetooth after settings
have been loaded before.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
- Prevent double callback with ADV re-scheduling
For configurations using CONFIG_BT_CTLR_JIT_SCHEDULING, when last
ADV before initiating connection is re-scheduled with a small delay,
the disabled_cb would be called a second time. This would unexpectedly
invoke a second conn setup with illegal parameters.
To avoid this JIT scheduler phenomenon, clear the ADV disabled_cb
when invoked.
- Add priority to LLL header. This allows the conn priority to be
associated with the object. Used in vendor LLL implementation.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Do not retransmit a message that just has been send successfully.
This case can in particular happen quite frequently if the modem
connection/throughput is quite bad and so there is a high latency.
A message that has to be acknowledged is scheduled for retransmission.
Before retransmission a ack for this message is received that will
cause a reset of the original message. In this case you see a
"LwM2M message is invalid" error message.
Signed-off-by: Andreas Chmielewski <andreas.chmielewski@grandcentrix.net>
After PR: https://github.com/zephyrproject-rtos/zephyr/pull/38296
If we receive the second recovery after 192 hours after the first
recovery, we may still not be able to perform any recovery, even
if the IV Index differs by 42, because the `ivi_was_recovered` flag
will only be cleared during the iv update.
But still May lose iv update, as we did the first iv recovery.
This patch by checking the iv duration, if 192h later, auto clear
`ivi_was_recovered` flag.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Read operation must return empty payload when read /object_id
if there is no created object instances.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
Use dedicated function for calculating stack usage of the
interrupt stack(s).
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add option to include analysis of interrupt stack(s) when
threads are analyzed.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
There is no releavnce between CAN sockets and offloading that would
prevent one from working with another, therefore it's not right to
allow CAN sockets to be build only if offloading is disabled. Fix the
wrong dependency in socket CMakeLists.txt file.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Added a missing assert statement for validation of the preferred
supervision timeout parameter which can be configured by the user
via Kconfig.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Minor improvement: Use already existing variable, rather than finding
the same value again. It is clearer, and simpler, to use the variable
everywhere this value is needed.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
Avoids copying the address and assigning the SID if the
PA list is used, as the values are ignored by the
controller, and thus there is no reason to copy
or assign the values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The smp_process_request_packet has been checking return code from
mgmt_streamer_init_writer where Zephyr implementation of the
callback always returns 0.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Fix bug in radio implementation that reported any transmit error
as `OT_ERROR_NO_ACK` to OpenThread.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
This is to support Sypnosys Designware SDMMC controller read and write
operation where the buffer address is needed to be 16bytes and 512bytes
aligned. Adding macro FS_FATFS_WINDOW_ALIGNMENT to align the "win"
variable address in FATFS struct.
Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
This solves the following issues:
- Auto-initiation of commands is aborted if one of the issued commands
fails
- The controller return value for a PHY update or DL update is not
made available to the application.
As a result, the host no longer prevents the application from calling
bt_conn_le_data_len_update() and bt_conn_le_phy_update() before the
auto-initiated procedure completes. Now the controller may or may not
accept the additional command issued by the application.
It also simplifies the code:
- We no longer need to keep track of if the auto-phy update
or auto-dl update has completed. If the controller receives
another LE Set PHY while the procedure is pending in the LL, it can
decide if wants to accept another procedure initiation or not.
- We no longer need to auto-initiate auto-initiation of commands in
multiple places
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Logging v2 did not support getting memory usage data. Adding this
support by creating common api for getting current and maximum
usage. Tracking of maximum usage is optional and can be enabled
using CONFIG_LOG_MEM_UTILIZATION.
Updated shell command to use common API.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
There were some references to slave and master left in the unittests
for the refactored LLCP.
These are changed in respectively peripheral and central
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Tests that when a collision happens, the connection attempt is retried
and that it succeeds.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
The iso_rx_pool did not use the correct buffer size due to
a missing BT_ISO_SDU_BUF_SIZE, causing it to be too small.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Ensure that ISO-TP Consecutive Frames (CF) are sent in
FIFO/chronological order.
In order to ensure this, we can only have one CF queued in the CAN
controller TX mailboxes at a time, since transmit order for mailboxes
with the same CAN-ID (priority) is hardware specific.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Firmware uploading to the host may not always be desired,
disable it by default.
Enable it for existing USB DFU sample to keep
the usual behavior, add note about new option to README.rst.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Rename confusing UPLOAD_FLASH_AREA_ID to DOWNLOAD_FLASH_AREA_ID
as it is area where firmware image is downloaded.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
It is possible that the actual data stage length of
the control transfer is zero, in that case we do not
need an additional ZLP packet.
This fixes a problem with USB DFU, where after an upload
the device is no longer responsive if upload size is
multiple of control endpoint MPS.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Fix an issue where a test's suite name was misspelled and thus the
test never ran because it wasn't associated with a suite. Example:
ZTEST_SUITE(my_suite, NULL, NULL, NULL, NULL, NULL);
ZTEST(myy_suite, test)
{
}
The above will no longer pass since `myy_suite` with a double `y` will
fail the verification.
Signed-off-by: Yuval Peress <peress@google.com>
This fix a typo where incorrect member of bt_keys was used for
checking if LTK is present. This was resulting in bogus results
depending on connection role and current identity used.
This was affecting L2CAP/LE/CFC/BV-25-C qualification test case.
Fixes: #42862
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Periodic advertising sync may be created with CTE type filtering
enabled. When received AUX_SYNC_IND, there are HCI_LE_Periodic_-
Advertising_Sync_Established and HCI_LE_Periodic_Advertising_Report
events generated. In case received AUX_SYNC_IND has wrong CTE type,
HCI_LE_Periodic_Advertising_Sync_Established event is generated.
There may not be HCI_LE_Periodic_Advertising_Report event generated.
In this case node_rx, prepared by LLL, was not released in ULL.
It was lost in ull_sync_established_report.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
CONFIG_BT_CTLR_DF_CTE_RX is enabled by default if CONFIG_BT_CLTR_DF
is enabled and there is support for DF in given SOC.
If CONFIG_BT_CTLR_DF_SCAN_CTE_RX is disabled then the CONFIG_BT_CTLR-
_PER_SCAN_CTE_NUM_MAX is not available.
It causes build errors if that particular configuration is used by
an application. It was a case for example in split builds of direction
finding connectionless TX sample application were periodic advertising
was enabled but perddioc advertising sync was disabled.
The commit fixes the problem.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Previously the data was set incorrectly when the data was set in
multiple operations. It did not take the previous state into account.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/42648
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
There were used an uninitialized variable to set antenna identifiers
length. The value should be set with use of params argument, not
by cp pointer that is not yet initialized.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fix to use non-discardable Rx buffer for handling Extended
and Periodic Advertising Report.
Regression introduced in
commit 18171bc774 ("Bluetooth: Host: Non-discardable event
buffer size is 255 for ext adv"). The default discardable Rx
buffer size was reduced causing increased fragmentation and
deadlock trying to get more free discardable Rx buffers to
generate HCI Extended and Periodic Advertising reports.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This reverts commit e7489d8de7.
And fixes the deadlock by allowing only 1 thread to actualy clean up
the connection when the ref_count is 0.
Signed-off-by: Daniel Nejezchleb <dnejezchleb@hwg.cz>
Fixes issue #39989.
Save CCC data on pairing complete by replacing private addresses
for the just bonded device with its public address in CCC attributes'
CFG arrays. This is then followed by calls to bt_gatt_store_ccc
and bt_gatt_store_cf for the just bonded device.
Signed-off-by: Jim Benjamin Luther <jilu@oticon.com>
On some platforms, if there are multiple MODBUS interfaces,
receiving of RTU frames may fail. Replacing while loop with
just "if" fixes this problem.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Fix race condition in setting up ISR callback and parameter
caused between ULL_HIGH and LLL context. As LLL IRQ is not
disabled the parameter and ISR callback would get out of
sync causing incorrect parameter supplied to callback and
hence leading to development assert in ull_scan_done().
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing use of auxiliary context to generate done event
which caused leak in release of auxiliary context being not
release when reference count that should decrease to zero.
Regression in 'commit 665a8d2c6e ("Bluetooth: Controller:
Fix repeated per sync drift compensations").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix reset of is_aux_sched flag when closing the primary and
auxiliary PDU reception. Without this fix when scan window
is closed there would be duplicate auxiliary release message
generated causing memory corruption.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add development assert to check the validity of auxiliary
context allocation. This is to ensure that primary PDU
reception does not have an auxiliary context allocated until
ULL has processed the node rx.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add development assert to check the validity of auxiliary
context's parent. This is to ensure a released auxiliary
context is not reused without allocation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This patch is to fix an issue where the transceiver chip is
disabled before it has transmitted all data. This causes the
message to be corrupted because the last few bytes are missing.
The fix adds a check to make sure the transmission is completed
before disabling the transceiver.
Signed-off-by: Marius Scholtz <mariuss@ricelectronics.com>
Takes the modem state machine by calling lcp_close instead of lcp_down
Using this method the LCP layer sends a TERMINATE_REQ to the modem and the
network interface is only taken down when the LCP layer has properly
finished.
Moved the ppp_mgmt_raise_carrier_off_event and net_if_carrier_down
to lcp.c to avoid breaking the interface.
Tested on a real modem.
Fixes: zephyrproject-rtos#41627
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
Fixes bug where Host sends L2CAP Flow Control Credit after receiving a
L2CAP Disconnect Response.
The when the callback in l2cap_chan_le_recv_sdu is handed a Disconnect
Reponse, the connnection becomes disconnected, as illustrated by the
asserts. The function should now trigger sending credits if the
connection is disconnected after the callback returns.
Fixes#42112
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Fix Periodic Advertising Synchronization lost implementation
to avoid processing done event twice in cases of overlapping
events or race between sync terminate being requested.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add code comment related to sync context field used to
indicate the sync established event being generated towards
HCI Layer.
Co-authored-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update implementation to generate Periodic Sync Failed to be
Established when Sync Established message could not be
generate due to lack of free node rx buffers and when there
is sync lost before sync established message could be
generated.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In case of error in hci_df_prepare_connectionless_iq_report function
e.g. due to wrong periodic advertising sync handle, uninitilized
per_adv_sync and IQ report object were passed by cte_report_cb callback
to an application.
Correct behavior in such situation is to not to cal cte_report_cb callback.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fix any stray Extended Auxiliary PDU from being scanned
when disabling Extended Scanning.
Updated Extended Scan disable implementation to find any
active auxiliary scan context and stop them.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix advertising pdu latest get to defer release of stale
PDU chain buffers. Returning NULL after some buffers where
released causes LLL to assert when chained PDUs are
switched.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
many functions in the lwm2m librarys api take a pathstr argument
that is never written to, so make it const
Signed-off-by: Henning Fleddermann <henning.fleddermann@grandcentrix.net>
Nordic Semiconductor Radio peripheral provides IQ samples as
12 bits signed integer with sign extended to 16 bits.
Where out of range IQ samples (saturated) have value -32768.
Due to conversion of IQ samples to 8 bit signed integer, required by
BT 5.3 Core Vol 4, Part E sections 7.7.65.21 and 7.7.65.22 the
saturation information was lost.
The PR fixes that issue by use of value -128 to mark saturated
IQ samples. Note that BT 5.3 Core does not give any particular
value of IQ sample a special meaning.
This is a vendor specific solution and does not affect other
implementations of lower link layer.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The path was erroneously pointing to update state
resource instead of update result causing a wrong
resource value to be updated.
Signed-off-by: Jarno Lamsa <jarno.lamsa@nordicsemi.no>
After https://github.com/zephyrproject-rtos/zephyr/pull/41337, extended
advertising reports are no longer discardable. Ensure the
non-discardable events are large enough.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
The conn pointer is still valid / not reused at this time and can be
used further up the stack as an identifer. This simplifies the API of
ATT, and fixes callbacks in GATT that pass on this value directly since
their API does not allow conn to be NULL.
Fixes#41794
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Unlock tcp_lock when calling the recv_cb. In case when
a connection is being closed from both the tcp stack
and the application, a race condition can happen resulting
in locking each other out on tcp_lock and socket lock.
Signed-off-by: Daniel Nejezchleb <dnejezchleb@hwg.cz>
Possibility to initialize USB device support is useful when
only CDC ACM class is enabled and CDC ACM UART is used as
backend for console, shell, or logging.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
HCI/GEV/BV-01-C tries to send 255 bytes over HCI, as part of sending
an unknown/unsupported command, but the default buffer size
is 65, which results in a buffer overflow and undefined behaviour.
Instead of crashing hard we now check the buffer length.
In order for EDTT tests to pass we set the buffer size to 255
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
This patch fixes an issue where mcux usb devices may stop
functioning after a reset event, because they do not
provide a USB_DC_DISCONNECTED event and USB_DC_RESET
events were not handled by the forward status callback.
Signed-off-by: Jacob Caughfield <mlsvrts@protonmail.com>
In previous commits the crc16_ansi() function has been made compliant
with the CRC-16-ANSI aka CRC-16-MODBUS standard. Use that standard
function instead of a custom one.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Since this CRC uses the 0x1021 poly with no reflection, a faster
implementation is available in the crc16_itu_t() function, which is
O(n).
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Fix Periodic Sync Terminate implementation for race
conditions with ULL scheduling by using a flag to stop any
new ULL scheduling to receive chain PDUs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
There was missing a PDU initialization. CP bit in data channel
PDU heder was not cleared. Also cte_info byte was not crelader.
That lead to malformed control procedures PDUs and issues
with connection maintenance.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
In direction finding connected mode there is a CP bit that is set
data PDU header. The bit was initialized only if CTE transmission
was enabled. In case of reception of a CTE the bit was available
in PDUs but not initialized.
That caused issues in connection maintenance if PDU memory buffers
were reused. PDU were malformed and connections were lost.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Guard call to k_thread_abort() to ensure it's not called with an
uninitialized thread and fix improper use of inet_pton() with
INADDR_ANY passed in place of a dotted-decimal string. Both of these
would otherwise lead to NULL pointer dereferences.
Signed-off-by: Berend Ozceri <berend@recogni.com>
Fix missing offset adjust field assignment in the Periodic
Advertising's sync_info struct that is present in the
Extended Advertising PDU.
When the sync offset is equal or over 2.4576 seconds from
the Extended Advertising PDU, then the sync offset has to
be reduced by 2.4576 seconds and the offs_adjust flag be
set in the sync_info field.
This fixes a bug where Periodic Synchronization could not
be established for Periodic Advertisings with intervals
greater than 2.4576 seconds as the sync offset was
incorrect due to rollover in the 13-bit offset field.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Firmware Update Protocol Support resource initialization
has been left out in #41402.
Initialise the resource in object creation function.
Signed-off-by: Marin Jurjević <marin.jurjevic@hotmail.com>
The Exchange MTU sub-procedure shall only be supported on the
LE Fixed Channel Unenhanced ATT bearer.
This was checked when receiving, but sending was allowed.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
The directory listing's record length should not reflect the size of the
directory listing object. This field is only the size of the directory
listing entry in the directory object and is intended to help a client
find the next record entry in the list.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
The packaged string coming from logging subsys requires some
additional processing if there are string arguments.
These strings are actually embedded inside the package so
the string pointers inside the argument list must be
replaced with pointers to strings inside the package.
Without this extra step of processing, MIPI Sys-T's printf
function would process these arguments directly which may be
NULL pointers or invalid one pointing to somewhere.
This utilizes the new cbpprintf_external() for the processing
before feeding data to the MIPI library.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The commit fixes smp_process_request_packet failing to decrement
message_size, of read stream, by number of bytes it trims from
an input buffer.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Increments send retry every time
after the tcp_send_data when resending.
That way unhandled return values can time
out after set amount of tcp_retries.
Signed-off-by: Daniel Nejezchleb <dnejezchleb@hwg.cz>
The new macro USBD_STRING_DESCR_USER_DEFINE works like
USBD_STRING_DESCR_DEFINE with the exception of being
ordered strictly after it. The new macro is needed to
ensures that user defined string descriptors can be added
without disturbing the order of string descriptors
defined by the usb subsystem.
Signed-off-by: Alexander Mihajlovic <a@abxy.se>
Constant Tone Extension may not be transmittied with PHY CODED.
There were check to avoid situation that controller tries to
transmit or receive CTE when PHY is set to CODED.
These check were not conditionally compilated, hence when
PHY Update feature is disabled code did build.
The commit fixes the issue.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
In case the direction finding RX is enabled but without Angle
of Arrival functionality enabled, there HCI command buffer
had wrong command length assigned. It didn't take into account
two dummy antenna IDs provided to fulfil requirement from
BT 5.3 Core Vol 4, Part E sections: 7.7.82, 7.7.85.
HCI driver when received such command buffer, didn't handle it
due to wrong command length.
The commit fixes the problem.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
BT_BUF_EVT_RX_SIZE size by default was set to 68 bytes.
In case of build with direction finding connected mode receiver
enabled the size of event buffer was not enough to store all
IQ samples. In such situation IQ samples reports were not delivered
to Host.
The commit changes default size of event RX buffer to 255 in
case the BT_DF_CONNECTION_CTE_RX is enabled.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Direction finding samples had dependency on KConfig option defined
in Controller. That caused a problem for split builds where
an application and host are not part of the same binary as
controller. The code dependend on the Kconfig option
was always disabled.
To fix that issue new Kconfig options were introduced to
Host. The dependency is removed. Unwanted features may stil be
disabled and samples binaier will be smaller.
The commit aligns all direction finding samples code.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
A common pattern here was to take the work item as the subfield of a
containing object. But the contained field is not a k_work, it's a
k_work_delayable.
Things were working only because the work field was first, so the
pointers had the same value. Do things right and fix things to
produce correct code if/when that field ever moves within delayable.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
OpenOCD is still using these alias, until we fix OpenOCD
upstream we should keep them.
This partially reverts commit
1a7bc06086.
Signed-off-by: Julien Massot <julien.massot@iot.bzh>
Fix duplicate incomplete data status generated for Periodic
Advertising Report when LLL scheduling is used but auxiliary
context failed to be allocated in ULL.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix duplicate release of auxiliary context when scanning
uses LLL scheduling for reception of auxiliary PDU but the
reception fails.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Calling lwm2m_rd_client_stop causes the client context to be closed.
Doing this from arbitrary thread other than internal lwm2m engine thread
causes racing condition on lwm2m engine context pointers.
Fixes#42358
Signed-off-by: Marin Jurjević <marin.jurjevic@hotmail.com>
Move the same peer periodic sync check to after check for
existing periodic sync create on both 1M and Coded PHY.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing progression of the rx_last pointer when
appending rx buffers before flushing them towards Host.
Under continuous scanning, as the disabled_cb would only
be called when reference count reaches zero, the rx_last
pointer needs to progress when appending the rx buffers.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing Periodic Advertising Report with incomplete
data status when ULL scheduled chain reception is aborted.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing Periodic Advertising Report with incomplete
data status when LLL scheduled chain reception is aborted.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Controller implementation to release auxiliary context
when there is no node rx buffer available to receive
Periodic Advertising Sync AUX_CHAIN_IND PDUs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Periodic Advertising Report data status when ULL
scheduling to receive auxiliary PDU fails. Defer the
dispatch of Periodic Advertising Report until ULL
scheduling status is comfirmed and assign the correct
value to aux_sched flag.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Server Object SSID should only have Read access.
LightweightM2M-1.1-int-256 confirmance test validate
that write operation to SSID should return error.
Overwrite SSID affect dead block for lwm2m engine and
only reset will heal.
Fix by adding bootstrap overwrite access for Security and
Server object when bootstrap is active.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
Use explicit casting to long long within `snprintk()` and logger
functions to prevent compiler warnings with different
platforms/toolchins (as 64-bit integer can be either represented
as ld or lld depending on platform).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
At some point OMA TLV integer encoding was optimised to use the smallest
size possible. This broke the objlnk encoding, which internally used
`put_s32()`, but should always be 4 bytes long. In case the result
32-bit integer would fit into 16 or 8 bytes, it'd get optimized.
Fix this, by creating and writing TLV manually for objlnk instead of
relying on int32 encoder.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case a string with an integer was provided to the function (no
decimal point), the function did not update the output pointer value.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Verify the restult of the content writer functions and return an error
if content writer fails to read/write field in the message.
This solves an issue when for example malformed packet was sent to the
server if the payload did not fit in the message.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
It's now possible to return an error code instead of 0 where
appropriate.
Make `buf_read()` return -ENODATA instead of -ENOMEM if there's not
enough data in the packet to serve the request, which is more meaningful
for this scenario.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rework the content encoder/decoder API to allow to return negative
values as well. This allows a proper error reporting and error handling,
as it's now possible to differentiate when there is no content to write
(retuned 0) or and error occured, and further processing should be
aborted.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When a file is download, `ctc->current` is increaed by the block
size, which is correct for all the blocks except the last one.
Once the download is compelted, ctx->current must match
`ctx->total_size`.
Signed-off-by: Efrain Calderon <efrain.calderon@aquarobur.com>
There were no wait for free notification buffer (pdu object
used to send notifications to Host).
That may cause assertion in lp_comm_ntf function.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Accodring to BT 5.3 Core Vol 4, Part E section 7.8.85 the CTE request
procedure has to be disabled as if Host issued the HCI_LE_Connection-
CTE_Request_Enable with enable property set to 0. It means a Controller
should automaticall disable the procedure.
There were no handling of this part of specification.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There were missing pause of CTE request in case remote PHY change
was handled. That may end in violation of BT 5.3 Core Vol 6, Part B
section 5.1.10.1 Packet transmission restrictions.
Without the change there was a possibility to transmitt CTE when
PHY is about to change to PHY CODED.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add handling of complete event in idle state of localy innitiated
control procedures.
The transition will be used by CTE request disable if PHY changes
to CODED while the procedure is waiting in the waiting queue.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
CTE request may not be enabled when actual PHY does not support
transmission of constant tone extension. In case a connection is
asymetric, receive PHY is required to support transmission of CTE.
Receive PHY will be used by a device to get PDU with CTE.
In ll_df_set_conn_cte_req_enable was checking TX PHY type.
It should check RX PHY type.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add a function that is responsible for set CTE request disabled.
It is a refactoring, to have a single place where CTE request
is_enabled and req_interval are zeroed.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There were missing set of is_enabled member of CTE request.
That allowed host to run HCI_LE_Connection_CTE_Request_Enable
command with enable parameter set to true sequently.
That violates BT 5.3 Core specification Vol 4 Part B section
7.8.8.85.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The commit fixes smp_process_request_packet not checking header
stated message length against actual message length.
This could lead to an erratic behavior of an application when it tries
to parse CBOR data beyond actual size of message or potential
Zephyr crash.
When application has asserts enabled the error leads to inevitable
Zephyr crash, caused by net_buf checks.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Fix net_pkt leak by increasing net_context the reference count earlier
in the zsock_accepted_cb() with instalment of the
zsock_received_cb() callback.
And consequently flushing recv_q and decrement net_context
reference count if zsock_accept_ctx() fails.
Signed-off-by: Daniel Nejezchleb <dnejezchleb@hwg.cz>
In case system workqueue processing is delayed for any reason, and
resolver callback is executed after getaddrinfo() call already timed
out, the system would crash as the callback makes use of the user data
allocated on the stack within getaddrinfo() function.
Prevent that, by cancelling the DNS request explicitly from the
getaddrinfo() context, therefore preventing the resolver callback
from being executed after the getaddrinfo() call ends.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Now that the forced flag is cleared with the kernel locked in the
suspend path, we need to clear it out when the suspend process fails.
This is being done before jump to the end label because in the
successful path the flag is already cleared.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The "state forced" flag has to be cleared with the scheduler locked,
otherwise the idle thread can be scheduled out without clear it and
the next call to force a state will fail.
Fixes#41911
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Use UTIL_CAT which resolves input arguments instead of direct
preprocessor concatenation.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Enable debug pins when TF-M has been enabled for the image.
This would otherwise produce an error message as the DEBUG_SETUP would
not have been defined for the non-secure image.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix missing ISO Data packet received by Synchronized
Receiver due to incorrect check on sink handle that did
not permit handle value of 0.
Fixed function to get ISO stream context to check for
valid ISO sync context, i.e. not being terminated.
Regression introduced in commit 7c89f1fe9f ("Bluetooth:
controller: Support for separate ISO RX data path").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The changes smp_process_request_packet to return MGMT_ERR_ECORRUPT
in case when failed to read header.
This helps to recognize that there will not be any response sent
from mcumgr to the buffer given to smp_process_request_packet as
it has not been recognized as valid request.
It also removes redundant check on mgmt_streamer_init_reader which
always returns 0 (no failure) in Zephyr.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The previous approach to detect if the underlying transport was closed
(by checking the return value of `mbedtls_ssl_read()` was not right,
since the function call does not request any data - therefore 0 as a
return value is perfectly fine.
Instead, rely on the underlying transport ZSOCK_POLLHUP event - if it
reports that the connection ended, forward the event to the application.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Report ZSOCK_POLLHUP event if peer closed the connection, and thus the
socket is in EOF state.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The mcumgr image upload uses buffed flash writes with use of stream
flash, which makes flash alignment check unneded.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Fix implementation to check for empty ADV_EXT_IND and
ADV_SYNC_IND PDUs, and not parse them incorrectly.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix implementation to limit Periodic Advertising data to a
configurable maximum length when generating HCI reports.
Bluetooth Test Specification defines Scan_Max_Data value
in IXIT. When HCI LE Periodic Advertising Report events are
generated by assembling the chain PDUs, the test cases
expect that if the data length is no more than
Scan_Max_Data, then at least once the IUT shall not
truncate the data in the advertising report.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Remove redundant parameter pass of lll_aux to isr_done as
the auxiliary context use is always for scan context as the
parent.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>