You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/06/22 13:18:26 UTC
[mynewt-nimble] 06/12: nimble/ll/css: Disallow conn update if css is enabled
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 37f3324a464ed2b88efb378994ce844b971fe04a
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Thu Jun 9 17:47:53 2022 +0200
nimble/ll/css: Disallow conn update if css is enabled
Since all central connections are fully managed by css, we shall reject
any connection parameters change requested by host.
---
nimble/controller/src/ble_ll_conn_hci.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/nimble/controller/src/ble_ll_conn_hci.c b/nimble/controller/src/ble_ll_conn_hci.c
index 2ffda58a..4617d3a7 100644
--- a/nimble/controller/src/ble_ll_conn_hci.c
+++ b/nimble/controller/src/ble_ll_conn_hci.c
@@ -955,6 +955,15 @@ ble_ll_conn_hci_update(const uint8_t *cmdbuf, uint8_t len)
return BLE_ERR_UNK_CONN_ID;
}
+#if MYNEWT_VAL(BLE_LL_CONN_STRICT_SCHED)
+ /* Do not allow connection update if css in enabled, we only allow to move
+ * anchor point (i.e. change slot) via dedicated HCI command.
+ */
+ if (connsm->conn_role == BLE_LL_CONN_ROLE_CENTRAL) {
+ return BLE_ERR_CMD_DISALLOWED;
+ }
+#endif
+
/* Better not have this procedure ongoing! */
if (IS_PENDING_CTRL_PROC(connsm, BLE_LL_CTRL_PROC_CONN_PARAM_REQ) ||
IS_PENDING_CTRL_PROC(connsm, BLE_LL_CTRL_PROC_CONN_UPDATE)) {