Defined struct in node rx for passing event parameters of
Advertising Set Terminated Event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Implementation of Advertising Set Terminated Event on
duration sans use of additional variable in advertising
set context structure.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Updated implementation to have consistent initialization of
ret_cb use when passing it to ticker function calls.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor implementation to perform enable and started state
updates at consistent places in code.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use the NRF RNG entropy device as the entropy device for bt_rand and
controller internal functions when LLL is Nordic.
Using an entropy source with a significant increase in stack usage
will invalidate all stack size configurations in the system and lead
to stack overflow issues.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Review rework, added comments, TODOs, FIXMEs and converted
magic number use in advertising set state flags to defines.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor pdu.h defined in anticipation of reused in
Advertising Extensions implementation. To reuse in
calculating ticks_slots etc.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing Auxiliary PDU when primary PDU is calculating
the offset. Schedule the auxiliary PDU ticker before primary
PDU ticker is scheduled.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix to avoid a crash due to missing aux_ptr in current
primary PDU constructed by LE Set Extended Advertising
Parameter Set, while aux_ptr was populated by LE Set
Extended Advertising Data Set in the latest double buffered
PDU.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added implementation to handle updates to adv mode and event
properties of an already created advertising set.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Remove us_radio_rdy field in the footer structure as its always
a constant value which can be obtained using a functional
interface to HAL.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix legacy advertising started using Extended Advertising
sets to use the set advertising random address.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Allow use of HCI LE Set Random Address cmd when advertising
is enabled using Extended Advertising commands.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added implementation to support setting of legacy
Advertising Data and Scan Response Data using Extended
Advertising Data set functions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Differentiate call to ll_adv_params_set, whether used by
legacy LE Set Advertising Parameters or LE Set Extended
Advertising Parameters.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix conditional compilation of advertising extensions and
periodic advertising do that platforms with not support in
their LLL can be built without advertising extensions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor to reuse common repeated code in ISR that reset
status, and performed abort, done and cleanup.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add implementation to support ADV_EXT_IND PDU with AuxPtr.
Changes in this commit only prepares the ADV_EXT_IND PDU
in the primary channel.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The existing feature exchange procedure does not give the proper
response as specified in the BT core spec 5.0.
The old behaviour is that the feature-response returns the logical and
of the features for both peers.
The behaviour implemented here is that the feature-response returns the
featureset of the peer, except for octet 0 which is the logical and of
the supported features.
Tested by using the bt shell, and having different featuresets
on the 2 peers.
This fixes#25483
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Split BT_CTLR_CONN_RSSI option into two, the base option enables the
Read RSSI command, while the new BT_CTLR_CONN_RSSI_EVENT enables the
connection RSSI events. There is no handling of RSSI events, only a
BT_INFO log.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Set the local RPA field of the enhanced connection complete event only
when the address was generated by the controller. If the host has
set an RPA and this one was used the controller should return all
zeroes.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove use of k_cpu_idle in controller, and refactor the
implementation used to start, wait and stop clocks needed
by the controller.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
A bug in the PKT_US resulted in wrong calculations for the 2M phy.
Fixes the bug, verified on EBQ.
Also adds some defines for improved readability.
Fixes#23482
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Update LLCP handling during PHY update and Data Length update to not
start the LL control procedure if the remote has already indicated that
the procedure is not supported.
This fulfills the following requirement from the BT Core Specification
(Core_v5.2, Vol 6, Part B, Section 4.6):
Except where explicitly stated elsewhere in this specification, if the
peer Link Layer has indicated either during a feature exchange procedure
or by responding with an LL_UNKNOWN_RSP PDU that it does not support a
procedure, then the Link Layer shall not use that procedure.
Re-use the connection parameter request handling for PHY and
data length update procedures.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix uninitialized advertiser rl_idx used to check own identity
in CONNECT_IND received for directed advertisements.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
SMI TX is different than other controller features in that it does not
necessarily imply any software changes; whether SMI TX is supported
may be simply a matter of hardware calibration. This change supports
using the same software on chips that do or do not support SMI TX
depending on calibration.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Fix controllers address check in cases of controller-based
privacy is supported but not used to start advertising.
This fixes regression introduced in
commit 896619ad40 ("Bluetooth: controller: Fix
controller address check").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>