Bluetooth: Kconfig: Merge BT_HCI_VS_EXT into BT_HCI_VS

The naming of these two options was problematic, since it's both of them
are about vendor extensions, even though one has _EXT in the name and
the other doesn't. Just merge one option into the other. This has a
slight overhead on the controller side of enabling some more vendor
features if BT_HCI_VS is enabled, but that should hopefully be
acceptable.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
This commit is contained in:
Johan Hedberg 2024-05-10 15:37:11 +03:00 committed by Anas Nashif
commit 18c23daee3
21 changed files with 34 additions and 52 deletions

View file

@ -17,7 +17,7 @@ config BT_BLUENRG_ACI
# Disable Flow control
config BT_HCI_ACL_FLOW_CONTROL
default n
config BT_HCI_VS_EXT
config BT_HCI_VS
default n
endif # BT

View file

@ -36,7 +36,7 @@ config BT_BLUENRG_ACI
# Disable Flow control
config BT_HCI_ACL_FLOW_CONTROL
default n
config BT_HCI_VS_EXT
config BT_HCI_VS
default n
endif # BT

View file

@ -36,7 +36,7 @@ config BT_BLUENRG_ACI
# Disable Flow control
config BT_HCI_ACL_FLOW_CONTROL
default n
config BT_HCI_VS_EXT
config BT_HCI_VS
default n
endif # BT

View file

@ -19,7 +19,7 @@ config BT_BLUENRG_ACI
# Disable Flow control
config BT_HCI_ACL_FLOW_CONTROL
default n
config BT_HCI_VS_EXT
config BT_HCI_VS
default n
endif # BT

View file

@ -21,7 +21,7 @@ config BT_BLUENRG_ACI
config BT_HCI_ACL_FLOW_CONTROL
default n
config BT_HCI_VS_EXT
config BT_HCI_VS
default n
endif # BT

View file

@ -91,7 +91,7 @@ CONFIG_BT_GATT_CACHING=n
CONFIG_BT_GATT_SERVICE_CHANGED=n
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n
CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=y
CONFIG_BT_HCI_VS_EXT=n
CONFIG_BT_HCI_VS=n
# Disable Bluetooth controller features not needed
CONFIG_BT_CTLR_PRIVACY=n

View file

@ -79,8 +79,6 @@ CONFIG_BT_MESH_LOG_LEVEL_DBG=y
#CONFIG_BT_MESH_ADV_LOG_LEVEL_DBG=y
#CONFIG_BT_MESH_SELF_TEST=y
#CONFIG_BT_HCI_VS_EXT=n
#CONFIG_STACK_USAGE=y
CONFIG_BT_RX_STACK_SIZE=4096

View file

@ -190,32 +190,23 @@ config BT_HCI_VS
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. This enables Write BD_ADDR, Read Build Info,
Read Static Addresses and Read Key Hierarchy Roots vendor commands.
config BT_HCI_VS_EVT
bool "Zephyr HCI Vendor-Specific Events"
depends on BT_HCI_VS_EXT
depends on BT_HCI_VS
help
Enable support for the Zephyr HCI Vendor-Specific Events in the
Host and/or Controller.
config BT_HCI_VS_FATAL_ERROR
bool "Allow vendor specific HCI event Zephyr Fatal Error"
depends on BT_HCI_VS_EXT
depends on BT_HCI_VS
help
Enable emiting HCI Vendor-Specific events for system and Controller
errors that are unrecoverable.
config BT_HCI_VS_EXT_DETECT
bool "Use heuristics to guess HCI vendor extensions support in advance"
depends on BT_HCI_VS_EXT && !BT_CTLR
depends on BT_HCI_VS && !BT_CTLR
default y if BOARD_QEMU_X86 || BOARD_QEMU_CORTEX_M3 || BOARD_NATIVE_POSIX
help
Use some heuristics to try to guess in advance whether the controller

View file

@ -137,7 +137,7 @@ config BT_CTLR_CRYPTO
config BT_CTLR_HCI_VS_BUILD_INFO
string "Zephyr HCI VS Build Info string"
default ""
depends on BT_HCI_VS_EXT
depends on BT_HCI_VS
help
User-defined string that will be returned by the Zephyr VS Read Build
Information command after the Zephyr version and build time. When
@ -428,7 +428,7 @@ config BT_CTLR_TX_PWR_ANTENNA
config BT_CTLR_TX_PWR_DYNAMIC_CONTROL
bool "Tx Power Dynamic Control"
depends on BT_HCI_VS_EXT
depends on BT_HCI_VS
help
Enable dynamic control of Tx power per role/connection.
Provides HCI VS commands to set and get the current Tx
@ -1007,7 +1007,7 @@ config BT_CTLR_ASSERT_HANDLER
config BT_CTLR_VS_SCAN_REQ_RX
bool "Use scan request reporting"
depends on BT_HCI_VS_EXT && !BT_CTLR_ADV_EXT
depends on BT_HCI_VS && !BT_CTLR_ADV_EXT
select BT_HCI_VS_EVT
select BT_CTLR_SCAN_REQ_NOTIFY
help

View file

@ -312,7 +312,7 @@ endchoice
config BT_CTLR_DF_VS_CL_IQ_REPORT_16_BITS_IQ_SAMPLES
bool "Use 16 bits signed integer IQ samples in connectionless IQ reports"
depends on BT_CTLR_DF_SCAN_CTE_RX && BT_HCI_VS_EXT
depends on BT_CTLR_DF_SCAN_CTE_RX && BT_HCI_VS
select BT_HCI_VS_EVT
help
Direction Finging connectionless IQ reports provide a set of IQ samples collected during
@ -323,7 +323,7 @@ config BT_CTLR_DF_VS_CL_IQ_REPORT_16_BITS_IQ_SAMPLES
config BT_CTLR_DF_VS_CONN_IQ_REPORT_16_BITS_IQ_SAMPLES
bool "Use 16 bits signed integer IQ samples in connection IQ reports"
depends on BT_CTLR_DF_CONN_CTE_RX && BT_HCI_VS_EXT
depends on BT_CTLR_DF_CONN_CTE_RX && BT_HCI_VS
select BT_HCI_VS_EVT
help
Direction Finging connection IQ reports provide a set of IQ samples collected during

View file

@ -4790,12 +4790,12 @@ static int controller_cmd_handle(uint16_t ocf, struct net_buf *cmd,
/* If Zephyr VS HCI commands are not enabled provide this functionality directly
*/
#if !defined(CONFIG_BT_HCI_VS_EXT)
#if !defined(CONFIG_BT_HCI_VS)
uint8_t bt_read_static_addr(struct bt_hci_vs_static_addr addrs[], uint8_t size)
{
return hci_vendor_read_static_addr(addrs, size);
}
#endif /* !defined(CONFIG_BT_HCI_VS_EXT) */
#endif /* !defined(CONFIG_BT_HCI_VS) */
#if defined(CONFIG_BT_HCI_VS)
@ -4827,7 +4827,6 @@ static void vs_read_supported_commands(struct net_buf *buf,
/* Set Version Information, Supported Commands, Supported Features. */
rp->commands[0] |= BIT(0) | BIT(1) | BIT(2);
#if defined(CONFIG_BT_HCI_VS_EXT)
/* Write BD_ADDR, Read Build Info */
rp->commands[0] |= BIT(5) | BIT(7);
/* Read Static Addresses, Read Key Hierarchy Roots */
@ -4846,7 +4845,6 @@ static void vs_read_supported_commands(struct net_buf *buf,
/* Set USB Transport Mode */
rp->commands[2] |= BIT(0);
#endif /* USB_DEVICE_BLUETOOTH_VS_H4 */
#endif /* CONFIG_BT_HCI_VS_EXT */
}
static void vs_read_supported_features(struct net_buf *buf,
@ -4869,7 +4867,6 @@ uint8_t __weak hci_vendor_read_static_addr(struct bt_hci_vs_static_addr addrs[],
return 0;
}
#if defined(CONFIG_BT_HCI_VS_EXT)
static void vs_write_bd_addr(struct net_buf *buf, struct net_buf **evt)
{
struct bt_hci_cp_vs_write_bd_addr *cmd = (void *)buf->data;
@ -5323,8 +5320,6 @@ static void vs_le_df_connection_iq_report(struct node_rx_pdu *node_rx, struct ne
}
#endif /* CONFIG_BT_CTLR_DF_VS_CONN_IQ_REPORT_16_BITS_IQ_SAMPLES */
#endif /* CONFIG_BT_HCI_VS_EXT */
#if defined(CONFIG_BT_HCI_MESH_EXT)
static void mesh_get_opts(struct net_buf *buf, struct net_buf **evt)
{
@ -5501,7 +5496,6 @@ int hci_vendor_cmd_handle_common(uint16_t ocf, struct net_buf *cmd,
break;
#endif /* CONFIG_USB_DEVICE_BLUETOOTH_VS_H4 */
#if defined(CONFIG_BT_HCI_VS_EXT)
case BT_OCF(BT_HCI_OP_VS_READ_BUILD_INFO):
vs_read_build_info(cmd, evt);
break;
@ -5539,7 +5533,6 @@ int hci_vendor_cmd_handle_common(uint16_t ocf, struct net_buf *cmd,
vs_set_min_used_chans(cmd, evt);
break;
#endif /* CONFIG_BT_CTLR_MIN_USED_CHAN && CONFIG_BT_PERIPHERAL */
#endif /* CONFIG_BT_HCI_VS_EXT */
#if defined(CONFIG_BT_HCI_MESH_EXT)
case BT_OCF(BT_HCI_OP_VS_MESH):

View file

@ -881,7 +881,7 @@ config BT_DF_CTE_TX_AOD
config BT_DF_VS_CL_IQ_REPORT_16_BITS_IQ_SAMPLES
bool "Use 16 bits signed integer IQ samples in connectionless IQ reports"
depends on BT_DF_CONNECTIONLESS_CTE_RX && BT_HCI_VS_EXT
depends on BT_DF_CONNECTIONLESS_CTE_RX && BT_HCI_VS
select BT_HCI_VS_EVT
help
Direction Finging connectionless IQ reports provide a set of IQ samples collected during
@ -892,7 +892,7 @@ config BT_DF_VS_CL_IQ_REPORT_16_BITS_IQ_SAMPLES
config BT_DF_VS_CONN_IQ_REPORT_16_BITS_IQ_SAMPLES
bool "Use 16 bits signed integer IQ samples in connection IQ reports"
depends on BT_DF_CONNECTION_CTE_RX && BT_HCI_VS_EXT
depends on BT_DF_CONNECTION_CTE_RX && BT_HCI_VS
select BT_HCI_VS_EVT
help
Direction Finging connection IQ reports provide a set of IQ samples collected during

View file

@ -3665,7 +3665,7 @@ static void bt_dev_show_info(void)
bt_dev.lmp_version, bt_dev.lmp_subversion);
}
#if defined(CONFIG_BT_HCI_VS_EXT)
#if defined(CONFIG_BT_HCI_VS)
static const char *vs_hw_platform(uint16_t platform)
{
static const char * const plat_str[] = {
@ -3803,7 +3803,7 @@ static void hci_vs_init(void)
net_buf_unref(rsp);
}
}
#endif /* CONFIG_BT_HCI_VS_EXT */
#endif /* CONFIG_BT_HCI_VS */
static int hci_init(void)
{
@ -3858,7 +3858,7 @@ static int hci_init(void)
return err;
}
#if defined(CONFIG_BT_HCI_VS_EXT)
#if defined(CONFIG_BT_HCI_VS)
hci_vs_init();
#endif
err = bt_id_init();

View file

@ -373,7 +373,7 @@ struct bt_dev {
/* Supported commands */
uint8_t supported_commands[64];
#if defined(CONFIG_BT_HCI_VS_EXT)
#if defined(CONFIG_BT_HCI_VS)
/* Vendor HCI support */
uint8_t vs_features[BT_DEV_VS_FEAT_MAX];
uint8_t vs_commands[BT_DEV_VS_CMDS_MAX];

View file

@ -1487,7 +1487,7 @@ static void bt_read_identity_root(uint8_t *ir)
/* Invalid IR */
memset(ir, 0, 16);
#if defined(CONFIG_BT_HCI_VS_EXT)
#if defined(CONFIG_BT_HCI_VS)
struct bt_hci_rp_vs_read_key_hierarchy_roots *rp;
struct net_buf *rsp;
int err;
@ -1514,7 +1514,7 @@ static void bt_read_identity_root(uint8_t *ir)
memcpy(ir, rp->ir, 16);
net_buf_unref(rsp);
#endif /* defined(CONFIG_BT_HCI_VS_EXT) */
#endif /* defined(CONFIG_BT_HCI_VS) */
}
#endif /* defined(CONFIG_BT_PRIVACY) */
@ -1589,7 +1589,7 @@ int bt_setup_public_id_addr(void)
return id_create(BT_ID_DEFAULT, &addr, irk);
}
#if defined(CONFIG_BT_HCI_VS_EXT)
#if defined(CONFIG_BT_HCI_VS)
uint8_t bt_read_static_addr(struct bt_hci_vs_static_addr addrs[], uint8_t size)
{
struct bt_hci_rp_vs_read_static_addrs *rp;
@ -1638,11 +1638,11 @@ uint8_t bt_read_static_addr(struct bt_hci_vs_static_addr addrs[], uint8_t size)
return cnt;
}
#endif /* CONFIG_BT_HCI_VS_EXT */
#endif /* CONFIG_BT_HCI_VS */
int bt_setup_random_id_addr(void)
{
#if defined(CONFIG_BT_HCI_VS_EXT) || defined(CONFIG_BT_CTLR)
#if defined(CONFIG_BT_HCI_VS) || defined(CONFIG_BT_CTLR)
/* Only read the addresses if the user has not already configured one or
* more identities (!bt_dev.id_count).
*/
@ -1689,7 +1689,7 @@ int bt_setup_random_id_addr(void)
return 0;
}
}
#endif /* defined(CONFIG_BT_HCI_VS_EXT) || defined(CONFIG_BT_CTLR) */
#endif /* defined(CONFIG_BT_HCI_VS) || defined(CONFIG_BT_CTLR) */
if (IS_ENABLED(CONFIG_BT_PRIVACY) && IS_ENABLED(CONFIG_BT_SETTINGS)) {
atomic_set_bit(bt_dev.flags, BT_DEV_STORE_ID);

View file

@ -25,7 +25,7 @@ CONFIG_BT_CTLR_SCAN_REQ_NOTIFY=n
CONFIG_BT_CTLR_SCAN_REQ_RSSI=n
CONFIG_BT_CTLR_PROFILE_ISR=n
CONFIG_BT_CTLR_DEBUG_PINS=n
CONFIG_BT_HCI_VS_EXT=n
CONFIG_BT_HCI_VS=n
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SMP=y

View file

@ -27,7 +27,7 @@ CONFIG_BT_CTLR_SCAN_REQ_NOTIFY=n
CONFIG_BT_CTLR_SCAN_REQ_RSSI=n
CONFIG_BT_CTLR_PROFILE_ISR=n
CONFIG_BT_CTLR_DEBUG_PINS=n
CONFIG_BT_HCI_VS_EXT=y
CONFIG_BT_HCI_VS=y
CONFIG_BT_CTLR_VS_SCAN_REQ_RX=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CENTRAL=y

View file

@ -44,7 +44,7 @@ CONFIG_BT_CTLR_EVENT_OVERHEAD_RESERVE_MAX=n
CONFIG_BT_CTLR_PROFILE_ISR=y
CONFIG_BT_CTLR_DEBUG_PINS=y
CONFIG_BT_CTLR_TEST=y
CONFIG_BT_HCI_VS_EXT=y
CONFIG_BT_HCI_VS=y
CONFIG_BT_HCI_MESH_EXT=n
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CENTRAL=y

View file

@ -34,7 +34,7 @@ CONFIG_BT_CTLR_SCAN_INDICATION=y
CONFIG_BT_CTLR_PROFILE_ISR=y
CONFIG_BT_CTLR_DEBUG_PINS=y
CONFIG_BT_CTLR_TEST=y
CONFIG_BT_HCI_VS_EXT=y
CONFIG_BT_HCI_VS=y
CONFIG_BT_HCI_MESH_EXT=n
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CENTRAL=y

View file

@ -35,7 +35,7 @@ CONFIG_BT_CTLR_TEST=y
CONFIG_BT_TICKER_EXT=n
CONFIG_BT_TICKER_SLOT_AGNOSTIC=y
CONFIG_BT_TICKER_PREFER_START_BEFORE_STOP=y
CONFIG_BT_HCI_VS_EXT=y
CONFIG_BT_HCI_VS=y
CONFIG_BT_HCI_MESH_EXT=n
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CENTRAL=y

View file

@ -29,7 +29,7 @@ CONFIG_BT_CTLR_SCAN_REQ_RSSI=n
CONFIG_BT_CTLR_PROFILE_ISR=n
CONFIG_BT_CTLR_PROFILE_ISR=n
CONFIG_BT_CTLR_DEBUG_PINS=n
CONFIG_BT_HCI_VS_EXT=n
CONFIG_BT_HCI_VS=n
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_SMP=y