Skip to content

Commit 947b38a

Browse files
committed
Bluetooth: controller: Replace slave with peripheral
Replace the old slave term with the new peripheral one from the Bluetooth spec v5.3. Signed-off-by: Carles Cufi <[email protected]>
1 parent ba2d2ee commit 947b38a

40 files changed

+315
-309
lines changed

doc/releases/release-notes-2.7.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ Modified in this release
8181

8282
* The ``CONFIG_BT_PERIPHERAL_PREF_SLAVE_LATENCY`` Kconfig option is now
8383
:kconfig:`CONFIG_BT_PERIPHERAL_PREF_LATENCY`
84+
* The ``CONFIG_BT_CTLR_SLAVE_FEAT_REQ_SUPPORT`` Kconfig option is now
85+
:kconfig:`CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT`
86+
* The ``CONFIG_BT_CTLR_SLAVE_FEAT_REQ`` Kconfig option is now
87+
:kconfig:`CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG`
8488

8589
Changes in this release
8690
==========================

subsys/bluetooth/controller/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ if(CONFIG_BT_LL_SW_SPLIT)
7373
)
7474
if(CONFIG_BT_PERIPHERAL)
7575
zephyr_library_sources(
76-
ll_sw/ull_slave.c
76+
ll_sw/ull_peripheral.c
7777
)
7878
zephyr_library_sources_ifdef(
7979
CONFIG_BT_CTLR_PERIPHERAL_ISO
@@ -82,7 +82,7 @@ if(CONFIG_BT_LL_SW_SPLIT)
8282
endif()
8383
if(CONFIG_BT_CENTRAL)
8484
zephyr_library_sources(
85-
ll_sw/ull_master.c
85+
ll_sw/ull_central.c
8686
)
8787
zephyr_library_sources_ifdef(
8888
CONFIG_BT_CTLR_CENTRAL_ISO

subsys/bluetooth/controller/Kconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ config BT_CTLR_CONN_PARAM_REQ_SUPPORT
1717
config BT_CTLR_EXT_REJ_IND_SUPPORT
1818
bool
1919

20-
config BT_CTLR_SLAVE_FEAT_REQ_SUPPORT
20+
config BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT
2121
bool
2222

2323
config BT_CTLR_DATA_LEN_UPDATE_SUPPORT
@@ -308,12 +308,12 @@ config BT_CTLR_EXT_REJ_IND
308308
Enable support for Bluetooth v4.1 Extended Reject Indication feature
309309
in the Controller.
310310

311-
config BT_CTLR_SLAVE_FEAT_REQ
312-
bool "Slave-initiated Features Exchange"
313-
depends on BT_CTLR_SLAVE_FEAT_REQ_SUPPORT
311+
config BT_CTLR_PER_INIT_FEAT_XCHG
312+
bool "Peripheral-initiated Features Exchange"
313+
depends on BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT
314314
default y
315315
help
316-
Enable support for Bluetooth v4.1 Slave-initiated Features Exchange
316+
Enable support for Bluetooth v4.1 Peripheral-initiated Features Exchange
317317
feature in the Controller.
318318

319319
config BT_CTLR_LE_PING

subsys/bluetooth/controller/Kconfig.ll_sw_split

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ config BT_LLL_VENDOR_NORDIC
1818
!BT_CTLR_PHY_2M_NRF
1919
select BT_CTLR_CONN_PARAM_REQ_SUPPORT
2020
select BT_CTLR_EXT_REJ_IND_SUPPORT
21-
select BT_CTLR_SLAVE_FEAT_REQ_SUPPORT
21+
select BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT
2222
select BT_CTLR_DATA_LEN_UPDATE_SUPPORT if HAS_HW_NRF_CCM_LFLEN_8BIT || \
2323
BT_CTLR_DATA_LENGTH_CLEAR
2424
select BT_CTLR_PRIVACY_SUPPORT if !SOC_SERIES_NRF51X
@@ -307,15 +307,15 @@ config BT_CTLR_SCHED_ADVANCED
307307
depends on (BT_MAX_CONN != 0) && BT_CTLR_SCHED_ADVANCED_SUPPORT
308308
default y if !(BT_PERIPHERAL && !BT_CENTRAL)
309309
help
310-
Enable non-overlapping placement of observer, initiator and master
310+
Enable non-overlapping placement of observer, initiator and central
311311
roles in timespace. Uses window offset in connection updates and uses
312-
connection parameter request in slave role to negotiate
313-
non-overlapping placement with active master roles to avoid slave
314-
roles drifting into active master roles in the local controller.
312+
connection parameter request in peripheral role to negotiate
313+
non-overlapping placement with active central roles to avoid peripheral
314+
roles drifting into active central roles in the local controller.
315315

316316
This feature maximizes the average data transmission amongst active
317-
concurrent master and slave connections while other observer,
318-
initiator, master or slave roles are active in the local controller.
317+
concurrent central and peripheral connections while other observer,
318+
initiator, central or peripheral roles are active in the local controller.
319319

320320
Disabling this feature will lead to overlapping role in timespace
321321
leading to skipped events amongst active roles.

subsys/bluetooth/controller/hci/hci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6345,7 +6345,7 @@ static void le_unknown_rsp(struct pdu_data *pdu_data, uint16_t handle,
63456345
{
63466346

63476347
switch (pdu_data->llctrl.unknown_rsp.type) {
6348-
case PDU_DATA_LLCTRL_TYPE_SLAVE_FEATURE_REQ:
6348+
case PDU_DATA_LLCTRL_TYPE_PER_INIT_FEAT_XCHG:
63496349
le_remote_feat_complete(BT_HCI_ERR_UNSUPP_REMOTE_FEATURE,
63506350
NULL, handle, buf);
63516351
break;

subsys/bluetooth/controller/include/ll_feat.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
#define LL_FEAT_BIT_EXT_REJ_IND 0
2626
#endif /* !CONFIG_BT_CTLR_EXT_REJ_IND */
2727

28-
#if defined(CONFIG_BT_CTLR_SLAVE_FEAT_REQ)
29-
#define LL_FEAT_BIT_SLAVE_FEAT_REQ BIT64(BT_LE_FEAT_BIT_PER_INIT_FEAT_XCHG)
30-
#else /* !CONFIG_BT_CTLR_SLAVE_FEAT_REQ */
31-
#define LL_FEAT_BIT_SLAVE_FEAT_REQ 0
32-
#endif /* !CONFIG_BT_CTLR_SLAVE_FEAT_REQ */
28+
#if defined(CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG)
29+
#define LL_FEAT_BIT_PER_INIT_FEAT_XCHG BIT64(BT_LE_FEAT_BIT_PER_INIT_FEAT_XCHG)
30+
#else /* !CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG */
31+
#define LL_FEAT_BIT_PER_INIT_FEAT_XCHG 0
32+
#endif /* !CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG */
3333

3434
#if defined(CONFIG_BT_CTLR_LE_PING)
3535
#define LL_FEAT_BIT_PING BIT64(BT_LE_FEAT_BIT_PING)
@@ -205,7 +205,7 @@
205205
#define LL_FEAT (LL_FEAT_BIT_ENC | \
206206
LL_FEAT_BIT_CONN_PARAM_REQ | \
207207
LL_FEAT_BIT_EXT_REJ_IND | \
208-
LL_FEAT_BIT_SLAVE_FEAT_REQ | \
208+
LL_FEAT_BIT_PER_INIT_FEAT_XCHG | \
209209
LL_FEAT_BIT_PING | \
210210
LL_FEAT_BIT_DLE | \
211211
LL_FEAT_BIT_PRIVACY | \

subsys/bluetooth/controller/ll_sw/lll_central.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
int lll_master_init(void);
8-
int lll_master_reset(void);
9-
void lll_master_prepare(void *param);
7+
int lll_central_init(void);
8+
int lll_central_reset(void);
9+
void lll_central_prepare(void *param);

subsys/bluetooth/controller/ll_sw/lll_conn.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct lll_conn {
6060
struct {
6161
uint8_t initiated:1;
6262
uint8_t cancelled:1;
63-
} master;
63+
} central;
6464
#if defined(CONFIG_BT_PERIPHERAL)
6565
struct {
6666
uint8_t initiated:1;
@@ -73,7 +73,7 @@ struct lll_conn {
7373
uint32_t window_widening_event_us;
7474
uint32_t window_size_prepare_us;
7575
uint32_t window_size_event_us;
76-
} slave;
76+
} periph;
7777
#endif /* CONFIG_BT_PERIPHERAL */
7878
};
7979

subsys/bluetooth/controller/ll_sw/lll_slave.h renamed to subsys/bluetooth/controller/ll_sw/lll_peripheral.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
int lll_slave_init(void);
8-
int lll_slave_reset(void);
9-
void lll_slave_prepare(void *param);
7+
int lll_periph_init(void);
8+
int lll_periph_reset(void);
9+
void lll_periph_prepare(void *param);

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ static int prepare_cb(struct lll_prepare_param *p)
856856
* transmitting connectable advertising event if cancelled flag is set.
857857
*/
858858
if (unlikely(lll->conn &&
859-
(lll->conn->slave.initiated || lll->conn->slave.cancelled))) {
859+
(lll->conn->periph.initiated || lll->conn->periph.cancelled))) {
860860
radio_isr_set(lll_isr_early_abort, lll);
861861
radio_disable();
862862

@@ -1091,7 +1091,7 @@ static void isr_tx(void *param)
10911091
radio_tmr_hcto_configure(hcto);
10921092

10931093
/* capture end of CONNECT_IND PDU, used for calculating first
1094-
* slave event.
1094+
* peripheral event.
10951095
*/
10961096
radio_tmr_end_capture();
10971097

@@ -1205,7 +1205,7 @@ static void isr_done(void *param)
12051205
*/
12061206
if (lll->chan_map_curr &&
12071207
#if defined(CONFIG_BT_PERIPHERAL)
1208-
(!lll->conn || !lll->conn->slave.cancelled) &&
1208+
(!lll->conn || !lll->conn->periph.cancelled) &&
12091209
#endif /* CONFIG_BT_PERIPHERAL */
12101210
1) {
12111211
struct pdu_adv *pdu;
@@ -1447,7 +1447,7 @@ static inline int isr_rx_pdu(struct lll_adv *lll,
14471447
*/
14481448
} else if ((pdu_rx->type == PDU_ADV_TYPE_CONNECT_IND) &&
14491449
(pdu_rx->len == sizeof(struct pdu_adv_connect_ind)) &&
1450-
lll->conn && !lll->conn->slave.cancelled &&
1450+
lll->conn && !lll->conn->periph.cancelled &&
14511451
lll_adv_connect_ind_check(lll, pdu_rx, tx_addr, addr,
14521452
rx_addr, tgt_addr,
14531453
devmatch_ok, &rl_idx)) {
@@ -1481,7 +1481,7 @@ static inline int isr_rx_pdu(struct lll_adv *lll,
14811481
#endif /* CONFIG_BT_CTLR_CONN_RSSI */
14821482

14831483
/* Stop further LLL radio events */
1484-
lll->conn->slave.initiated = 1;
1484+
lll->conn->periph.initiated = 1;
14851485

14861486
rx = ull_pdu_rx_alloc();
14871487

0 commit comments

Comments
 (0)