From 533936c15f47b5b482d9f4370f5304cb92dd1be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Rymanowski?= Date: Wed, 22 Apr 2020 11:35:06 +0200 Subject: [PATCH] nimble/ll: Fix for hci supported commands --- nimble/controller/include/controller/ble_ll_hci.h | 2 +- nimble/controller/src/ble_ll_supp_cmd.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/nimble/controller/include/controller/ble_ll_hci.h b/nimble/controller/include/controller/ble_ll_hci.h index abef8746f..6a9e48e53 100644 --- a/nimble/controller/include/controller/ble_ll_hci.h +++ b/nimble/controller/include/controller/ble_ll_hci.h @@ -27,7 +27,7 @@ extern "C" { #include "nimble/hci_common.h" /* For supported commands */ -#define BLE_LL_SUPP_CMD_LEN (42) +#define BLE_LL_SUPP_CMD_LEN (45) extern const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN]; /* The largest event the controller will send. */ diff --git a/nimble/controller/src/ble_ll_supp_cmd.c b/nimble/controller/src/ble_ll_supp_cmd.c index 834e0095a..1285d9182 100644 --- a/nimble/controller/src/ble_ll_supp_cmd.c +++ b/nimble/controller/src/ble_ll_supp_cmd.c @@ -410,6 +410,17 @@ BLE_SUPP_CMD_LE_PADV_DEFAULT_SYNC_TRANSFER_PARAMS \ ) +/* Octet 44 */ +#if MYNEWT_VAL(BLE_VERSION) >= 52 +#define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (1 << 0) +#else +#define BLE_SUPP_CMD_LE_SET_HOST_FEATURE (0 << 0) +#endif +#define BLE_LL_SUPP_CMD_OCTET_44 \ +( \ + BLE_SUPP_CMD_LE_SET_HOST_FEATURE \ +) + /* Defines the array of supported commands */ const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] = { @@ -455,4 +466,7 @@ const uint8_t g_ble_ll_supp_cmds[BLE_LL_SUPP_CMD_LEN] = BLE_LL_SUPP_CMD_OCTET_39, BLE_LL_SUPP_CMD_OCTET_40, /* Octet 40 */ BLE_LL_SUPP_CMD_OCTET_41, + 0, + 0, + BLE_LL_SUPP_CMD_OCTET_44, };