From 0b4047c1c40c30a4d700397152efa9d99e06ae43 Mon Sep 17 00:00:00 2001 From: Piotr Pryga Date: Fri, 3 Sep 2021 11:24:31 +0200 Subject: [PATCH] Bluetooth: hci: Add helper macros for ver of disallowed CTE types The commit adds helper macros for verification of disallowed CTE types when periodic advertising synchornization is created. The macros are added here, because they are directly related with values specified by BT Core 5.1 specification. Signed-off-by: Piotr Pryga --- include/bluetooth/hci.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/bluetooth/hci.h b/include/bluetooth/hci.h index 480b5d51237..ceed69e92b1 100644 --- a/include/bluetooth/hci.h +++ b/include/bluetooth/hci.h @@ -1432,11 +1432,16 @@ struct bt_hci_cp_le_ext_create_conn { #define BT_HCI_LE_PER_ADV_CREATE_SYNC_FP_USE_LIST BIT(0) #define BT_HCI_LE_PER_ADV_CREATE_SYNC_FP_REPORTS_DISABLED BIT(1) +#define BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_NO_FILTERING 0 #define BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_NO_AOA BIT(0) #define BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_NO_AOD_1US BIT(1) #define BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_NO_AOD_2US BIT(2) #define BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_NO_CTE BIT(3) #define BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_ONLY_CTE BIT(4) +/* Constants to check correctness of CTE type */ +#define BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_ALLOWED_BITS 5 +#define BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_INVALID_VALUE \ + (~BIT_MASK(BT_HCI_LE_PER_ADV_CREATE_SYNC_CTE_TYPE_ALLOWED_BITS)) #define BT_HCI_OP_LE_PER_ADV_CREATE_SYNC BT_OP(BT_OGF_LE, 0x0044) struct bt_hci_cp_le_per_adv_create_sync {