This is an automated email from the ASF dual-hosted git repository. andk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit caaf8e4678839f37750b130ce52f1163ea96ee52 Author: Andrzej Kaczmarek <[email protected]> AuthorDate: Thu Feb 20 14:10:02 2025 +0100 nimble/ll: Disable HCI LE Set Host Feat if no controllable features We don't need to support this command if there are no host-controllable features present in LL. --- nimble/controller/src/ble_ll.c | 3 +++ nimble/controller/src/ble_ll_hci.c | 2 +- nimble/controller/src/ble_ll_hci_supp_cmd.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nimble/controller/src/ble_ll.c b/nimble/controller/src/ble_ll.c index 8c22c89fb..238bfad1d 100644 --- a/nimble/controller/src/ble_ll.c +++ b/nimble/controller/src/ble_ll.c @@ -1464,6 +1464,7 @@ ble_ll_read_supp_features(void) return g_ble_ll_data.ll_supp_features; } +#if BLE_LL_HOST_CONTROLLED_FEATURES /** * Sets the features controlled by the host. * @@ -1502,6 +1503,8 @@ ble_ll_set_host_feat(const uint8_t *cmdbuf, uint8_t len) return BLE_ERR_SUCCESS; } +#endif + /** * Flush a link layer packet queue. * diff --git a/nimble/controller/src/ble_ll_hci.c b/nimble/controller/src/ble_ll_hci.c index 4446f8a9b..d07473301 100644 --- a/nimble/controller/src/ble_ll_hci.c +++ b/nimble/controller/src/ble_ll_hci.c @@ -1301,7 +1301,7 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf, } break; #endif /* BLE_LL_ISO */ -#if MYNEWT_VAL(BLE_VERSION) >= 52 +#if BLE_LL_HOST_CONTROLLED_FEATURES case BLE_HCI_OCF_LE_SET_HOST_FEATURE: rc = ble_ll_set_host_feat(cmdbuf, len); break; diff --git a/nimble/controller/src/ble_ll_hci_supp_cmd.c b/nimble/controller/src/ble_ll_hci_supp_cmd.c index eb4182ed6..75155060f 100644 --- a/nimble/controller/src/ble_ll_hci_supp_cmd.c +++ b/nimble/controller/src/ble_ll_hci_supp_cmd.c @@ -280,7 +280,7 @@ static const uint8_t octet_43 = OCTET( ); static const uint8_t octet_44 = OCTET( -#if MYNEWT_VAL(BLE_VERSION) >= 52 +#if BLE_LL_HOST_CONTROLLED_FEATURES BIT(1) /* HCI LE Set Host Feature */ #endif );
