Skip to content

Commit

Permalink
Bluetooth: controller: Remove legacy LL
Browse files Browse the repository at this point in the history
Remove the legacy Link Layer implementation.

Closes #24187.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
  • Loading branch information
carlescufi committed May 8, 2020
1 parent 35713f2 commit b67a31e
Show file tree
Hide file tree
Showing 40 changed files with 25 additions and 16,933 deletions.
4 changes: 2 additions & 2 deletions drivers/counter/Kconfig.nrfx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ config COUNTER_NRF_RTC
config COUNTER_TIMER0
bool "Enable Counter on TIMER0"
depends on HAS_HW_NRF_TIMER0
depends on !BT_LL_SW_LEGACY && !BT_LL_SW_SPLIT
depends on !BT_LL_SW_SPLIT
select COUNTER_NRF_TIMER

config COUNTER_TIMER1
Expand All @@ -36,7 +36,7 @@ config COUNTER_TIMER4
config COUNTER_RTC0
bool "Enable Counter on RTC0"
depends on HAS_HW_NRF_RTC0
depends on !BT_LL_SW_LEGACY && !BT_LL_SW_SPLIT
depends on !BT_LL_SW_SPLIT
select COUNTER_NRF_RTC

config COUNTER_RTC1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ CONFIG_BT_MESH_LABEL_COUNT=3
CONFIG_GPIO=y

CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_JOB_PRIO=1
CONFIG_BT_RX_BUF_COUNT=5
CONFIG_BT_HCI_TX_STACK_SIZE=1024
#CONFIG_BT_DEBUG_HCI_CORE=y
Expand Down
6 changes: 2 additions & 4 deletions subsys/bluetooth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ add_subdirectory_ifdef(CONFIG_BT_SHELL shell)
add_subdirectory_ifdef(CONFIG_BT_CONN services)
add_subdirectory_ifdef(CONFIG_BT_MESH mesh)

if(CONFIG_BT_CTLR)
if(CONFIG_BT_LL_SW_LEGACY OR CONFIG_BT_LL_SW_SPLIT)
add_subdirectory(controller)
endif()
if(CONFIG_BT_CTLR AND CONFIG_BT_LL_SW_SPLIT)
add_subdirectory(controller)
endif()
2 changes: 1 addition & 1 deletion subsys/bluetooth/common/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BUILD_ASSERT(CONFIG_BT_CTLR_RX_PRIO < CONFIG_BT_HCI_TX_PRIO);
* interrupts disabled.
*/
#if !defined(CONFIG_TEST) && !defined(CONFIG_ARCH_POSIX) && \
(defined(CONFIG_BT_LL_SW_SPLIT) || defined(CONFIG_BT_LL_SW_LEGACY))
defined(CONFIG_BT_LL_SW_SPLIT)
BUILD_ASSERT(!IS_ENABLED(CONFIG_LOG_IMMEDIATE), "Immediate logging not "
"supported with the software Link Layer");
#endif
64 changes: 4 additions & 60 deletions subsys/bluetooth/controller/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,40 +75,6 @@ config BT_LL_SW_SPLIT
help
Use Zephyr software BLE Link Layer ULL LLL split implementation.

config BT_LL_SW_LEGACY
# NOTE: This OLD architecture implementation will be deprecated, with
# no further new feature development.
bool "Software-based BLE Link Layer (deprecated)"
select BT_RECV_IS_RX_THREAD
select BT_HAS_HCI_VS
select ENTROPY_GENERATOR
select ENTROPY_NRF5_RNG if SOC_COMPATIBLE_NRF
select ENTROPY_NRF5_BIAS_CORRECTION if SOC_COMPATIBLE_NRF
depends on SOC_COMPATIBLE_NRF

select BT_CTLR_LE_ENC_SUPPORT if !BT_CTLR_DATA_LENGTH_CLEAR && \
!BT_CTLR_PHY_2M_NRF
select BT_CTLR_CONN_PARAM_REQ_SUPPORT
select BT_CTLR_EXT_REJ_IND_SUPPORT
select BT_CTLR_SLAVE_FEAT_REQ_SUPPORT
select BT_CTLR_DATA_LEN_UPDATE_SUPPORT if !SOC_SERIES_NRF51X || \
BT_CTLR_DATA_LENGTH_CLEAR
select BT_CTLR_PRIVACY_SUPPORT if !SOC_SERIES_NRF51X
select BT_CTLR_EXT_SCAN_FP_SUPPORT
select BT_CTLR_PHY_UPDATE_SUPPORT if !SOC_SERIES_NRF51X || \
BT_CTLR_PHY_2M_NRF
select BT_CTLR_ADV_EXT_SUPPORT
select BT_CTLR_CHAN_SEL_2_SUPPORT
select BT_CTLR_MIN_USED_CHAN_SUPPORT
select BT_CTLR_DTM_HCI_SUPPORT

select BT_CTLR_XTAL_ADVANCED_SUPPORT
select BT_CTLR_SCHED_ADVANCED_SUPPORT
select BT_CTLR_TIFS_HW_SUPPORT

help
Use Zephyr software BLE Link Layer implementation.

endchoice

config BT_LLL_VENDOR_NORDIC
Expand Down Expand Up @@ -393,7 +359,7 @@ config BT_CTLR_PRIVACY
bool "LE Controller-based Privacy"
depends on BT_CTLR_PRIVACY_SUPPORT
default y
select BT_CTLR_FILTER if (BT_LL_SW_SPLIT || BT_LL_SW_LEGACY)
select BT_CTLR_FILTER if BT_LL_SW_SPLIT
select BT_RPA
help
Enable support for Bluetooth v4.2 LE Controller-based Privacy feature
Expand Down Expand Up @@ -519,7 +485,7 @@ config BT_CTLR_SMI_TX_SETTING
help
Enable support for Bluetooth 5.0 SMI TX through a system setting.

if BT_LL_SW_SPLIT || BT_LL_SW_LEGACY
if BT_LL_SW_SPLIT

config BT_CTLR_ADVANCED_FEATURES
bool "Show advanced features"
Expand Down Expand Up @@ -582,28 +548,6 @@ config BT_CTLR_OPTIMIZE_FOR_SPEED
help
Optimize compilation of controller for execution speed.

if BT_LL_SW_LEGACY

config BT_CTLR_WORKER_PRIO
int "Radio and Ticker's Worker IRQ priority"
range 0 3 if SOC_SERIES_NRF51X
range 0 6 if SOC_COMPATIBLE_NRF52X
default 0
help
The interrupt priority for event preparation and radio IRQ. This value
shall be less than or equal to the Ticker's Job priority value.

config BT_CTLR_JOB_PRIO
int "Ticker's JOB IRQ priority"
range BT_CTLR_WORKER_PRIO 3 if SOC_SERIES_NRF51X
range BT_CTLR_WORKER_PRIO 6 if SOC_COMPATIBLE_NRF52X
default 0
help
The interrupt priority for Ticker's Job (SWI4) IRQ. This value shall
be greater than or equal to the Ticker's Worker IRQ priority value.

endif # BT_LL_SW_LEGACY

config BT_CTLR_XTAL_ADVANCED
bool "Advanced event preparation"
depends on BT_CTLR_XTAL_ADVANCED_SUPPORT
Expand Down Expand Up @@ -849,7 +793,7 @@ config BT_MAYFLY_YIELD_AFTER_CALL

config BT_TICKER_COMPATIBILITY_MODE
bool "Ticker compatibility mode"
default y if SOC_SERIES_NRF51X || BT_LL_SW_LEGACY
default y if SOC_SERIES_NRF51X
help
This option enables legacy ticker scheduling which defers overlapping
ticker node timeouts and thereby prevents ticker interrupts during
Expand Down Expand Up @@ -994,7 +938,7 @@ config BT_CTLR_DEBUG_PINS
when debugging with a logic analyzer or profiling certain sections of
the code.

endif # BT_LL_SW_SPLIT || BT_LL_SW_LEGACY
endif # BT_LL_SW_SPLIT

config BT_CTLR_ASSERT_HANDLER
bool "Application Defined Assertion Handler"
Expand Down
7 changes: 0 additions & 7 deletions subsys/bluetooth/controller/hci/hci_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ static void prio_recv_thread(void *p1, void *p2, void *p3)

buf = process_prio_evt(node_rx);
if (buf) {
#if defined(CONFIG_BT_LL_SW_LEGACY)
radio_rx_fc_set(node_rx->hdr.handle, 0);
#endif /* CONFIG_BT_LL_SW_LEGACY */

node_rx->hdr.next = NULL;
ll_rx_mem_release((void **)&node_rx);
Expand Down Expand Up @@ -184,10 +181,6 @@ static inline struct net_buf *encode_node(struct node_rx_pdu *node_rx,
break;
}

#if defined(CONFIG_BT_LL_SW_LEGACY)
radio_rx_fc_set(node_rx->hdr.handle, 0);
#endif /* CONFIG_BT_LL_SW_LEGACY */

node_rx->hdr.next = NULL;
ll_rx_mem_release((void **)&node_rx);

Expand Down
Loading

0 comments on commit b67a31e

Please sign in to comment.