Commit graph

27 commits

Author SHA1 Message Date
Vinayak Kariappa Chettimada 4bf2a0d520 Bluetooth: controller: Make coding style around ret_cb consistent
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>
2020-07-20 12:46:54 +02:00
Vinayak Kariappa Chettimada 69ef82f22f Bluetooth: controller: Fix missing RADIO_TXP_DEFAULT define
Fix compile error due to missing include file that defined
RADIO_TXP_DEFAULT.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-16 17:48:59 +02:00
Vinayak Kariappa Chettimada 516bae9536 Bluetooth: controller: split: Fix scan set allocation
Fix scan set allocation using BT_CTLR_SCAN_SET instead of
an incorrect duplicate BT_CTLR_SCAN_MAX.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-12 15:50:34 +02:00
Vinayak Kariappa Chettimada 18995306f1 Bluetooth: controller: split: Fix Ext Scanning when coded PHY unsupported
Fix implementation from starting coded PHY scan window.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-12 15:50:34 +02:00
Vinayak Kariappa Chettimada e9c80f8534 Bluetooth: controller: split: Initial extended scanning code
Initial extended scanning code added.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-12 15:50:34 +02:00
Vinayak Kariappa Chettimada 5d6c4a6cb5 Bluetooth: controller: split: Refactor node_rx_ftr
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>
2020-06-12 15:50:34 +02:00
Vinayak Kariappa Chettimada 3527778c41 Bluetooth: controller: split: Fix extended scan param set
Fix missing reset of phy struct member for scan set that is
not being enabled by use of LE Extended Scan Parameter Set
command.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-12 15:50:34 +02:00
Vinayak Kariappa Chettimada eb102d7822 Bluetooth: controller: split: Fix missing coded PHY scanning
Fix, use phy variable instead of type to determine if
scanning on Coded PHY is to be enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-12 15:50:34 +02:00
Vinayak Kariappa Chettimada a74276e1bd Bluetooth: controller: split: Added LE Ext. Create Connection
Added implementation of LE Extended Create Connection.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-12 15:50:34 +02:00
Vinayak Kariappa Chettimada e941e72092 Bluetooth: controller: split: Added Extended Scan Support
Updated implementation to support Extended Scan Parameters
and Extended Scan Enable.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-12 15:50:34 +02:00
Vinayak Kariappa Chettimada 594e12139b Bluetooth: controller: split: Use uint8_t for scan handles
Use uint8_t for scan set handles.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-12 15:50:34 +02:00
Vinayak Kariappa Chettimada 6dce205b95 Bluetooth: controller: split: Port advanced scheduling
Port advanced scheduling implementation from legacy
controller.

This implementation schedules
- non-overlapping scan window when there are simulataneous
central connections active
- central connection establishment with similar connection
intervals be placed in a non-overlapping  group, temporally
- connection parameter request with calculated window offset
hints to have non-overlapping BLE radio events.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-06-09 10:43:58 +02:00
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Andrei Stoica abd1d047dd Bluetooth: controller: enable dynamic TXP over LL_SPLIT arch (#17731)
This commit targets solving issue #17731 over the LL_SW_SPLIT
arch of the BLE stack in Zephyr. This functionality is exposed
to the user as HCI Zephyr Command extensions

- BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL
- BT_HCI_OP_VS_READ_TX_POWER_LEVEL

which enable Tx power read/write operations within BLE radio events
on a per role/connection basis.

The functionality is enabled upon the Kconfig advanced configuration
triggered by

- BT_CTLR_TX_PWR_DYNAMIC_CONTROL

depending on the enablement of Zephyr HCI vendor-specific command
extensions.

Necessary low-level radio HAL functionality and power definitions
are also supplied to address the high-level functionality of
controlling the Tx power.

Signed-off-by: Andrei Stoica <stoica.razvan.andrei@gmail.com>
2019-12-17 12:29:57 +01:00
Vinayak Kariappa Chettimada d5314b8387 Bluetooth: controller: split: Add missing BT_DEBUG_ENABLED define
Add missing BT_DEBUG_ENABLED definitions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-11-21 17:08:37 +01:00
Vinayak Kariappa Chettimada 0ef062407c Bluetooth: controller: split: Fix to reject invalid enable command
Fix to reject invalid advertise and scan enable commands.

Fixes BT HCI.TS.5.1.1 tests:
HCI/DDI/BI-06-C
HCI/DDI/BI-07-C

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-09-24 08:15:32 +02:00
Vinayak Kariappa Chettimada 3aa57808ac Bluetooth: controller: split: Add interface to get adv/scan handle
Added interface to get Advertiser and Scanner instance
handle for use in Lower Link Layer module.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-07-04 09:46:49 +02:00
Joakim Andersson 65b3f17aa9 Bluetooth: controller: Fix initialization of rl_idx and rpa_gen
The privacy state variables rl_idx and rpa_gen was not initialized
properly, which results in connection failing to be established.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2019-05-24 12:00:12 -04:00
Vinayak Kariappa Chettimada b928cef69c Bluetooth: controller: split: Port h/w privacy feature
Ported h/w based LL privacy to ULL/LLL split architecture.

Fixes #14675.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-05-24 12:00:12 -04:00
Vinayak Kariappa Chettimada e2dbe4f6f3 Bluetooth: controller: Fix incorrect conditional compilation
Fix incorrect conditional compilation that caused compile
error when lll_scan structure did not contain connection
context included which is needed only for central role.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-05-06 14:41:58 +02:00
Morten Priess 23e1f4d2bc bluetooth: controller: Added missing variable initializations
In ull.c ll_rx_get, a configuration without CONFIG_BT_CONN would
sometimes return an uninitialized node_rx.
In ull_scan.c, the scanning channel was not initialized to 0 (37). This
would cause new scanning to start at random index (0,1,2).

Signed-off-by: Morten Priess <mtpr@oticon.com>
2019-04-30 15:41:23 +02:00
Patrik Flykt 24d71431e9 all: Add 'U' suffix when using unsigned variables
Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Carlos Stuart 75f77db432 include: misc: util.h: Rename min/max to MIN/MAX
There are issues using lowercase min and max macros when compiling a C++
application with a third-party toolchain such as GNU ARM Embedded when
using some STL headers i.e. <chrono>.

This is because there are actual C++ functions called min and max
defined in some of the STL headers and these macros interfere with them.
By changing the macros to UPPERCASE, which is consistent with almost all
other pre-processor macros this naming conflict is avoided.

All files that use these macros have been updated.

Signed-off-by: Carlos Stuart <carlosstuart1970@gmail.com>
2019-02-14 22:16:03 -05:00
Vinayak Kariappa Chettimada 85d92923e2 Bluetooth: controller: Rename non-Kconfig option macros
Remove CONFIG_ prefix from non-Kconfig macro definitions.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-02-13 09:20:26 -05:00
Vinayak Kariappa Chettimada d33641f39a Bluetooth: controller: Remove underscore prefixes from functions
Cleanup and rename functions from having underscore prefixes.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-02-13 12:21:51 +01:00
Vinayak Kariappa Chettimada dd25e59762 Bluetooth: controller: Fix compile error in observer only support
Fix compile error due to missing conditional compile of
connection related code when selecting only observer state
support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-02-12 08:37:31 -05:00
Vinayak Kariappa Chettimada 1475402d41 Bluetooth: controller: Introduce ULL LLL architecture
This is a squash merge of commits introducing the new split
Upper Link Layer and Lower Link Layer architecture of the
Bluetooth Low Energy controller.

This introduces a new, improved Link Layer based on the
concept of split responsibilities; The Upper Link Layer
(ULL) is in charge of control procedures, inter-event
scheduling and overall role management. The code for the
ULL is shared among all hardware implementations. The
Lower Link Layer (LLL) is responsible for the intra-event
scheduling and vendor specific radio hardware access.

The communication between ULL and LLL is achieved through
a set of FIFOs that contain both control and data packets.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Signed-off-by: Wolfgang Puffitsch <wopu@oticon.com>
Signed-off-by: Morten Priess <mtpr@oticon.com>
2019-01-23 09:45:06 +01:00