Skip to content

Commit 2ada005

Browse files
Andries Kruithofaescolar
authored andcommitted
Bluetooth: controller: removing legacy LLCP code
This commit removes the legacy LLCP code including the Kconfig option It also updates the babblesim tests, and removes the tests for the legacy controller Signed-off-by: Andries Kruithof <[email protected]>
1 parent b3f7394 commit 2ada005

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+261
-7558
lines changed

samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52820.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
CONFIG_BT_CTLR=y
88
CONFIG_BT_LL_SW_SPLIT=y
99

10-
# Enable new implementation of LLCPs
11-
CONFIG_BT_LL_SW_LLCP=y
12-
1310
# Enable Direction Finding Feature including AoA and AoD
1411
CONFIG_BT_CTLR_DF=y
1512

samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
CONFIG_BT_CTLR=y
88
CONFIG_BT_LL_SW_SPLIT=y
99

10-
# Enable new implementation of LLCPs
11-
CONFIG_BT_LL_SW_LLCP=y
12-
1310
# Enable Direction Finding Feature including AoA and AoD
1411
CONFIG_BT_CTLR_DF=y
1512

samples/bluetooth/direction_finding_peripheral/boards/nrf52833dk_nrf52820.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
CONFIG_BT_CTLR=y
88
CONFIG_BT_LL_SW_SPLIT=y
99

10-
# Enable new implementation of LLCPs
11-
CONFIG_BT_LL_SW_LLCP=y
12-
1310
# Enable Direction Finding Feature including AoA and AoD
1411
CONFIG_BT_CTLR_DF=y
1512

samples/bluetooth/direction_finding_peripheral/boards/nrf52833dk_nrf52833.conf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
CONFIG_BT_CTLR=y
88
CONFIG_BT_LL_SW_SPLIT=y
99

10-
# Enable new implementation of LLCPs
11-
CONFIG_BT_LL_SW_LLCP=y
12-
1310
# Enable Direction Finding Feature including AoA and AoD
1411
CONFIG_BT_CTLR_DF=y
1512

samples/bluetooth/hci_uart/overlay-all-bt_ll_sw_split.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ CONFIG_BT_CTLR_DF=y
5656
CONFIG_BT_CTLR_DF_PER_ADV_CTE_NUM_MAX=3
5757
CONFIG_BT_CTLR_DF_PER_SCAN_CTE_NUM_MAX=3
5858

59-
CONFIG_BT_LL_SW_LLCP=y
6059
CONFIG_BT_CTLR_LLCP_LOCAL_PROC_CTX_BUF_NUM=6
6160

6261
CONFIG_BT_CTLR_DF_CTE_TX=y

subsys/bluetooth/controller/CMakeLists.txt

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -68,33 +68,30 @@ if(CONFIG_BT_LL_SW_SPLIT)
6868
zephyr_library_sources(
6969
ll_sw/ull_conn.c
7070
)
71-
if(CONFIG_BT_LL_SW_LLCP_LEGACY)
72-
else()
73-
zephyr_library_sources_ifdef(
74-
CONFIG_BT_CTLR_PHY
75-
ll_sw/ull_llcp_phy.c
76-
)
77-
zephyr_library_sources_ifdef(
78-
CONFIG_BT_CTLR_LE_ENC
79-
ll_sw/ull_llcp_enc.c
80-
)
81-
if (CONFIG_BT_CTLR_PERIPHERAL_ISO OR
82-
CONFIG_BT_CTLR_CENTRAL_ISO)
83-
zephyr_library_sources(
84-
ll_sw/ull_llcp_cc.c
85-
)
86-
endif()
71+
zephyr_library_sources_ifdef(
72+
CONFIG_BT_CTLR_PHY
73+
ll_sw/ull_llcp_phy.c
74+
)
75+
zephyr_library_sources_ifdef(
76+
CONFIG_BT_CTLR_LE_ENC
77+
ll_sw/ull_llcp_enc.c
78+
)
79+
if (CONFIG_BT_CTLR_PERIPHERAL_ISO OR
80+
CONFIG_BT_CTLR_CENTRAL_ISO)
8781
zephyr_library_sources(
88-
ll_sw/ull_tx_queue.c
89-
ll_sw/ull_llcp.c
90-
ll_sw/ull_llcp_common.c
91-
ll_sw/ull_llcp_local.c
92-
ll_sw/ull_llcp_pdu.c
93-
ll_sw/ull_llcp_conn_upd.c
94-
ll_sw/ull_llcp_chmu.c
95-
ll_sw/ull_llcp_remote.c
96-
)
82+
ll_sw/ull_llcp_cc.c
83+
)
9784
endif()
85+
zephyr_library_sources(
86+
ll_sw/ull_tx_queue.c
87+
ll_sw/ull_llcp.c
88+
ll_sw/ull_llcp_common.c
89+
ll_sw/ull_llcp_local.c
90+
ll_sw/ull_llcp_pdu.c
91+
ll_sw/ull_llcp_conn_upd.c
92+
ll_sw/ull_llcp_chmu.c
93+
ll_sw/ull_llcp_remote.c
94+
)
9895
if(CONFIG_BT_PERIPHERAL)
9996
zephyr_library_sources(
10097
ll_sw/ull_peripheral.c

subsys/bluetooth/controller/Kconfig.ll_sw_split

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ config BT_LLL_VENDOR_NORDIC
3737
select BT_CTLR_CTEINLINE_SUPPORT if HAS_HW_NRF_RADIO_DFE
3838
select BT_CTLR_CHAN_SEL_2_SUPPORT
3939
select BT_CTLR_MIN_USED_CHAN_SUPPORT
40-
select BT_CTLR_SCA_UPDATE_SUPPORT if !BT_LL_SW_LLCP_LEGACY
40+
select BT_CTLR_SCA_UPDATE_SUPPORT
4141
select BT_CTLR_DTM_HCI_SUPPORT
4242
select BT_CTLR_CONN_RSSI_SUPPORT
4343

@@ -85,27 +85,6 @@ config BT_CTLR_TIFS_HW_SUPPORT
8585
config BT_CTLR_ULL_LLL_PRIO_SUPPORT
8686
bool
8787

88-
choice BT_LL_SW_LLCP_IMPL
89-
prompt "Bluetooth Low Energy Software Link Layer Control Procedure Implementation"
90-
default BT_LL_SW_LLCP
91-
help
92-
Select the Bluetooth Low Energy Software Link Layer Control Procedure implementation.
93-
94-
config BT_LL_SW_LLCP_LEGACY
95-
bool "Legacy implementation (DEPRECATED)"
96-
depends on !BT_CTLR_DF_CONN_CTE_RX && !BT_CTLR_DF_CONN_CTE_TX
97-
select DEPRECATED
98-
help
99-
Use the Bluetooth Low Energy Software Link Layer Legacy Control Procedure implementation.
100-
101-
config BT_LL_SW_LLCP
102-
bool "State-machine based implementation, replacing the legacy one"
103-
help
104-
Use the new Bluetooth Low Energy Software Link Layer Control Procedure implementation.
105-
106-
endchoice
107-
108-
10988
config BT_CTLR_RX_PRIO_STACK_SIZE
11089
# Controller's Co-Operative high priority Rx thread stack size.
11190
int "High priority Rx thread stack size"
@@ -622,7 +601,6 @@ config BT_CTLR_LLCP_CONN
622601
more than this number of connections simultaneously may cause
623602
instabilities.
624603

625-
if !BT_LL_SW_LLCP_LEGACY
626604
config BT_CTLR_LLCP_TX_PER_CONN_TX_CTRL_BUF_NUM_MAX
627605
int
628606
default 4
@@ -674,23 +652,12 @@ config BT_CTLR_LLCP_REMOTE_PROC_CTX_BUF_NUM
674652
for handling remote initiated control procedures.
675653
This pool is shared across all connections, with allocation through a queue.
676654

677-
endif #!BT_LL_SW_LLCP_LEGACY
678-
679-
680655
config BT_CTLR_LLID_DATA_START_EMPTY
681656
bool "Handle zero length L2CAP start frame"
682657
default y if BT_HCI_RAW
683658
help
684659
Handle zero length L2CAP start frame.
685660

686-
config BT_CTLR_RX_ENQUEUE_HOLD
687-
bool "Procedure Complete after on-air instant"
688-
depends on BT_LL_SW_LLCP_LEGACY
689-
default y if BT_HCI_RAW
690-
help
691-
Hold enqueue of Procedure Complete events with instant until after the
692-
on-air instant is reached.
693-
694661
config BT_CTLR_TX_RETRY_DISABLE
695662
bool "Disable Tx Retry"
696663
help

subsys/bluetooth/controller/hci/hci.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353

5454
#include "ll_sw/isoal.h"
5555

56-
#if !defined(CONFIG_BT_LL_SW_LLCP_LEGACY)
5756
#include "ll_sw/ull_tx_queue.h"
58-
#endif
5957

6058
#include "ll_sw/ull_adv_types.h"
6159
#include "ll_sw/ull_scan_types.h"
@@ -4866,7 +4864,7 @@ static void vs_read_key_hierarchy_roots(struct net_buf *buf,
48664864
rp->status = 0x00;
48674865
hci_vendor_read_key_hierarchy_roots(rp->ir, rp->er);
48684866
}
4869-
#if !defined(CONFIG_BT_LL_SW_LLCP_LEGACY)
4867+
48704868
#if defined(CONFIG_BT_CTLR_MIN_USED_CHAN) && defined(CONFIG_BT_PERIPHERAL)
48714869
static void vs_set_min_used_chans(struct net_buf *buf, struct net_buf **evt)
48724870
{
@@ -4879,7 +4877,7 @@ static void vs_set_min_used_chans(struct net_buf *buf, struct net_buf **evt)
48794877
*evt = cmd_complete_status(status);
48804878
}
48814879
#endif /* CONFIG_BT_CTLR_MIN_USED_CHAN && CONFIG_BT_PERIPHERAL */
4882-
#endif /* !CONFIG_BT_LL_SW_LLCP_LEGACY */
4880+
48834881
#if defined(CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL)
48844882
static void vs_write_tx_power_level(struct net_buf *buf, struct net_buf **evt)
48854883
{
@@ -5450,13 +5448,6 @@ int hci_vendor_cmd_handle_common(uint16_t ocf, struct net_buf *cmd,
54505448
vs_read_tx_power_level(cmd, evt);
54515449
break;
54525450
#endif /* CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL */
5453-
#if !defined(CONFIG_BT_LL_SW_LLCP_LEGACY)
5454-
#if defined(CONFIG_BT_CTLR_MIN_USED_CHAN) && defined(CONFIG_BT_PERIPHERAL)
5455-
case BT_OCF(BT_HCI_OP_VS_SET_MIN_NUM_USED_CHANS):
5456-
vs_set_min_used_chans(cmd, evt);
5457-
break;
5458-
#endif /* CONFIG_BT_CTLR_MIN_USED_CHAN && CONFIG_BT_PERIPHERAL */
5459-
#endif /* !CONFIG_BT_LL_SW_LLCP_LEGACY */
54605451
#endif /* CONFIG_BT_HCI_VS_EXT */
54615452

54625453
#if defined(CONFIG_BT_HCI_MESH_EXT)
@@ -5465,6 +5456,12 @@ int hci_vendor_cmd_handle_common(uint16_t ocf, struct net_buf *cmd,
54655456
break;
54665457
#endif /* CONFIG_BT_HCI_MESH_EXT */
54675458

5459+
#if defined(CONFIG_BT_CTLR_MIN_USED_CHAN) && defined(CONFIG_BT_PERIPHERAL)
5460+
case BT_OCF(BT_HCI_OP_VS_SET_MIN_NUM_USED_CHANS):
5461+
vs_set_min_used_chans(cmd, evt);
5462+
break;
5463+
#endif /* CONFIG_BT_CTLR_MIN_USED_CHAN && CONFIG_BT_PERIPHERAL */
5464+
54685465
default:
54695466
return -EINVAL;
54705467
}

subsys/bluetooth/controller/ll_sw/ll_tx_pwr.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
#include "lll/lll_df_types.h"
3232
#include "lll_conn.h"
3333

34-
#if !defined(CONFIG_BT_LL_SW_LLCP_LEGACY)
35-
#include "ull_tx_queue.h"
36-
#endif
34+
#include "ll_sw/ull_tx_queue.h"
3735

3836
#include "ull_adv_types.h"
3937
#include "ull_scan_types.h"

subsys/bluetooth/controller/ll_sw/lll_conn.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,6 @@ struct lll_conn {
8787
};
8888

8989
#if defined(CONFIG_BT_CTLR_DATA_LENGTH)
90-
91-
#ifdef CONFIG_BT_LL_SW_LLCP_LEGACY
92-
uint16_t max_tx_octets;
93-
uint16_t max_rx_octets;
94-
95-
#if defined(CONFIG_BT_CTLR_PHY)
96-
uint16_t max_tx_time;
97-
uint16_t max_rx_time;
98-
#endif /* CONFIG_BT_CTLR_PHY */
99-
100-
#else /* CONFIG_BT_LL_SW_LLCP_LEGACY */
10190
struct {
10291
struct data_pdu_length local;
10392
struct data_pdu_length remote;
@@ -109,7 +98,6 @@ struct lll_conn {
10998
uint8_t update;
11099
} dle;
111100
#endif /* CONFIG_BT_CTLR_DATA_LENGTH */
112-
#endif/* CONFIG_BT_LL_SW_LLCP_LEGACY */
113101

114102
#if defined(CONFIG_BT_CTLR_PHY)
115103
uint8_t phy_tx:3;

0 commit comments

Comments
 (0)