Skip to content

Commit b407d02

Browse files
carlescufiAnas Nashif
authored andcommitted
Bluetooth: controller: Common config for VS extensions
Since the Zephyr HCI VS extensions apply to both the Host (using them for additional functionality) and the Controller (implement the commands and events), it make sense to make this a common setting in order for it to be configurable in a way that applies to both. Signed-off-by: Carles Cufi <[email protected]>
1 parent 416945a commit b407d02

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

subsys/bluetooth/common/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88

99
if BT_HCI
1010

11+
config BT_HCI_VS_EXT
12+
bool "Zephyr HCI Vendor-Specific Extensions"
13+
default y
14+
help
15+
Enable support for the Zephyr HCI Vendor-Specific Extensions in the
16+
Host and/or Controller.
17+
1118
config BT_RPA
1219
# Virtual/hidden option
1320
bool

subsys/bluetooth/controller/Kconfig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,10 @@ endchoice
3030

3131
comment "BLE Controller configuration"
3232

33-
config BT_CTLR_HCI_VS_EXT
34-
bool "Zephyr HCI Vendor-Specific Extensions"
35-
default y
36-
help
37-
Enable support for the Zephyr HCI Vendor-Specific Extensions in the
38-
Controller.
39-
4033
config BT_CTLR_HCI_VS_BUILD_INFO
4134
string "Zephyr HCI VS Build Info string"
4235
default ""
43-
depends on BT_CTLR_HCI_VS_EXT
36+
depends on BT_HCI_VS_EXT
4437
help
4538
User-defined string that will be returned by the Zephyr VS Read Build
4639
Information command after the Zephyr version and build time. When

subsys/bluetooth/controller/hci/hci.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,12 +1673,12 @@ static void vs_read_supported_commands(struct net_buf *buf,
16731673

16741674
/* Set Version Information, Supported Commands, Supported Features. */
16751675
rp->commands[0] |= BIT(0) | BIT(1) | BIT(2);
1676-
#if defined(CONFIG_BT_CTLR_HCI_VS_EXT)
1676+
#if defined(CONFIG_BT_HCI_VS_EXT)
16771677
/* Write BD_ADDR, Read Build Info */
16781678
rp->commands[0] |= BIT(5) | BIT(7);
16791679
/* Read Static Addresses, Read Key Hierarchy Roots */
16801680
rp->commands[1] |= BIT(0) | BIT(1);
1681-
#endif /* CONFIG_BT_CTLR_HCI_VS_EXT */
1681+
#endif /* CONFIG_BT_HCI_VS_EXT */
16821682
}
16831683

16841684
static void vs_read_supported_features(struct net_buf *buf,
@@ -1692,7 +1692,7 @@ static void vs_read_supported_features(struct net_buf *buf,
16921692
memset(&rp->features[0], 0x00, sizeof(rp->features));
16931693
}
16941694

1695-
#if defined(CONFIG_BT_CTLR_HCI_VS_EXT)
1695+
#if defined(CONFIG_BT_HCI_VS_EXT)
16961696
static void vs_write_bd_addr(struct net_buf *buf, struct net_buf **evt)
16971697
{
16981698
struct bt_hci_cp_vs_write_bd_addr *cmd = (void *)buf->data;
@@ -1813,7 +1813,7 @@ static void vs_read_key_hierarchy_roots(struct net_buf *buf,
18131813
#endif /* CONFIG_SOC_FAMILY_NRF5 */
18141814
}
18151815

1816-
#endif /* CONFIG_BT_CTLR_HCI_VS_EXT */
1816+
#endif /* CONFIG_BT_HCI_VS_EXT */
18171817

18181818
static int vendor_cmd_handle(u16_t ocf, struct net_buf *cmd,
18191819
struct net_buf **evt)
@@ -1831,7 +1831,7 @@ static int vendor_cmd_handle(u16_t ocf, struct net_buf *cmd,
18311831
vs_read_supported_features(cmd, evt);
18321832
break;
18331833

1834-
#if defined(CONFIG_BT_CTLR_HCI_VS_EXT)
1834+
#if defined(CONFIG_BT_HCI_VS_EXT)
18351835
case BT_OCF(BT_HCI_OP_VS_READ_BUILD_INFO):
18361836
vs_read_build_info(cmd, evt);
18371837
break;
@@ -1847,7 +1847,7 @@ static int vendor_cmd_handle(u16_t ocf, struct net_buf *cmd,
18471847
case BT_OCF(BT_HCI_OP_VS_READ_KEY_HIERARCHY_ROOTS):
18481848
vs_read_key_hierarchy_roots(cmd, evt);
18491849
break;
1850-
#endif /* CONFIG_BT_CTLR_HCI_VS_EXT */
1850+
#endif /* CONFIG_BT_HCI_VS_EXT */
18511851

18521852
default:
18531853
return -EINVAL;

0 commit comments

Comments
 (0)