From b4c43cf880cccccd90ac6865d000892ff671e399 Mon Sep 17 00:00:00 2001 From: Andrzej Kaczmarek Date: Wed, 15 Jun 2022 15:08:08 +0200 Subject: [PATCH] nimble/ll/css: Disallow slot change if css disabled --- nimble/controller/src/ble_ll_hci_vs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nimble/controller/src/ble_ll_hci_vs.c b/nimble/controller/src/ble_ll_hci_vs.c index 7504f10d2..5aee70f8a 100644 --- a/nimble/controller/src/ble_ll_hci_vs.c +++ b/nimble/controller/src/ble_ll_hci_vs.c @@ -233,6 +233,10 @@ ble_ll_hci_vs_css_set_conn_slot(const uint8_t *cmdbuf, uint8_t cmdlen, return BLE_ERR_INV_HCI_CMD_PARMS; } + if (!ble_ll_sched_css_is_enabled()) { + return BLE_ERR_CMD_DISALLOWED; + } + slot_idx = le16toh(cmd->slot_idx); if ((slot_idx >= ble_ll_sched_css_get_period_slots()) && (slot_idx != BLE_LL_CONN_CSS_NO_SLOT)) {