From e477c5a525bcb89880da8e6ee1bd57588cc3a468 Mon Sep 17 00:00:00 2001 From: Wolfgang Puffitsch Date: Fri, 24 Jan 2020 15:38:24 +0100 Subject: [PATCH] Bluetooth: controller: Add feature bits for SMI support Enable setting features bits for Stable Modulation Index in controller features. Signed-off-by: Wolfgang Puffitsch --- subsys/bluetooth/controller/Kconfig | 15 +++++++++++++++ subsys/bluetooth/controller/include/ll_feat.h | 14 ++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/subsys/bluetooth/controller/Kconfig b/subsys/bluetooth/controller/Kconfig index aa63a33035c..156a786512f 100644 --- a/subsys/bluetooth/controller/Kconfig +++ b/subsys/bluetooth/controller/Kconfig @@ -44,6 +44,9 @@ config BT_CTLR_MIN_USED_CHAN_SUPPORT config BT_CTLR_DTM_HCI_SUPPORT bool +config BT_CTLR_SMI_SUPPORT + bool + config BT_CTLR_XTAL_ADVANCED_SUPPORT bool @@ -495,6 +498,18 @@ config BT_CTLR_DTM_HCI help Enable support for Direct Test Mode over the HCI transport. +config BT_CTLR_SMI_RX + bool "Stable modulation index - Receiver" + depends on BT_CTLR_SMI_SUPPORT + help + Enable support for Bluetooth 5.0 SMI RX in the Controller. + +config BT_CTLR_SMI_TX + bool "Stable modulation index - Transmitter" + depends on BT_CTLR_SMI_SUPPORT + help + Enable support for Bluetooth 5.0 SMI TX in the Controller. + if BT_LL_SW_SPLIT || BT_LL_SW_LEGACY config BT_CTLR_ADVANCED_FEATURES diff --git a/subsys/bluetooth/controller/include/ll_feat.h b/subsys/bluetooth/controller/include/ll_feat.h index f5cdf980cc5..16ab9c1f4a5 100644 --- a/subsys/bluetooth/controller/include/ll_feat.h +++ b/subsys/bluetooth/controller/include/ll_feat.h @@ -84,6 +84,18 @@ #define LL_FEAT_BIT_PHY_CODED 0 #endif /* !CONFIG_BT_CTLR_PHY_CODED */ +#if defined(CONFIG_BT_CTLR_SMI_RX) +#define LL_FEAT_BIT_SMI_RX BIT64(BT_LE_FEAT_BIT_SMI_RX) +#else /* !CONFIG_BT_CTLR_SMI_RX */ +#define LL_FEAT_BIT_SMI_RX 0 +#endif /* !CONFIG_BT_CTLR_SMI_RX */ + +#if defined(CONFIG_BT_CTLR_SMI_TX) +#define LL_FEAT_BIT_SMI_TX BIT64(BT_LE_FEAT_BIT_SMI_TX) +#else /* !CONFIG_BT_CTLR_SMI_TX */ +#define LL_FEAT_BIT_SMI_TX 0 +#endif /* !CONFIG_BT_CTLR_SMI_TX */ + #define LL_FEAT_BIT_MASK 0x1FFFF #define LL_FEAT_BIT_MASK_VALID 0x1CF2F #define LL_FEAT (LL_FEAT_BIT_ENC | \ @@ -96,5 +108,7 @@ LL_FEAT_BIT_EXT_SCAN | \ LL_FEAT_BIT_PHY_2M | \ LL_FEAT_BIT_PHY_CODED | \ + LL_FEAT_BIT_SMI_RX | \ + LL_FEAT_BIT_SMI_TX | \ LL_FEAT_BIT_CHAN_SEL_2 | \ LL_FEAT_BIT_MIN_USED_CHAN)