nimble/ll/css: Disallow slot change if css disabled

This commit is contained in:
Andrzej Kaczmarek
2022-06-22 15:18:14 +02:00
parent 42ad7e1c78
commit b4c43cf880
+4
View File
@@ -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)) {