Bluetooth: Controller: Add CONFIG_BT_HCI_VS option
This allows to fully disable HCI VS commands support. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This commit is contained in:
parent
f93eef17a5
commit
e76224d038
2 changed files with 15 additions and 1 deletions
|
@ -8,12 +8,22 @@
|
|||
|
||||
if BT_HCI
|
||||
|
||||
config BT_HCI_VS
|
||||
bool "Zephyr HCI Vendor-Specific Commands"
|
||||
default y
|
||||
help
|
||||
Enable support for the Zephyr HCI Vendor-Specific Commmands in the
|
||||
Host and/or Controller. This enables Set Version Information,
|
||||
Supported Commands, Supported Features vendor commands.
|
||||
|
||||
config BT_HCI_VS_EXT
|
||||
bool "Zephyr HCI Vendor-Specific Extensions"
|
||||
depends on BT_HCI_VS
|
||||
default y
|
||||
help
|
||||
Enable support for the Zephyr HCI Vendor-Specific Extensions in the
|
||||
Host and/or Controller.
|
||||
Host and/or Controller. This enables Write BD_ADDR, Read Build Info,
|
||||
Read Static Addresses and Read Key Hierarchy Roots vendor commands.
|
||||
|
||||
config BT_HCI_VS_EXT_DETECT
|
||||
bool "Use heuristics to guess HCI vendor extensions support in advance"
|
||||
|
|
|
@ -1741,6 +1741,7 @@ static int controller_cmd_handle(u16_t ocf, struct net_buf *cmd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_HCI_VS)
|
||||
static void vs_read_version_info(struct net_buf *buf, struct net_buf **evt)
|
||||
{
|
||||
struct bt_hci_rp_vs_read_version_info *rp;
|
||||
|
@ -1951,6 +1952,7 @@ static int vendor_cmd_handle(u16_t ocf, struct net_buf *cmd,
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void data_buf_overflow(struct net_buf **buf)
|
||||
{
|
||||
|
@ -2009,9 +2011,11 @@ struct net_buf *hci_cmd_handle(struct net_buf *cmd)
|
|||
case BT_OGF_LE:
|
||||
err = controller_cmd_handle(ocf, cmd, &evt);
|
||||
break;
|
||||
#if defined(CONFIG_BT_HCI_VS)
|
||||
case BT_OGF_VS:
|
||||
err = vendor_cmd_handle(ocf, cmd, &evt);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
err = -EINVAL;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue