This is an automated email from the ASF dual-hosted git repository.
sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 8510f4e96 nimble/ll: Fix build with SCA update enabled and no PHY
update
8510f4e96 is described below
commit 8510f4e9672e95fb370717209035c6b9ac61f70d
Author: Szymon Janc <[email protected]>
AuthorDate: Wed Oct 7 20:30:07 2026 +0200
nimble/ll: Fix build with SCA update enabled and no PHY update
ble_ll_ctrl_sca_req_rsp_make() was defined inside BLE_LL_PHY block
which resulted in build error if SCA update procedure was enabled
without 2M or Coded PHY support. Move it next to the other SCA update
code.
Assisted-by: Claude:claude-opus-5-5
---
nimble/controller/src/ble_ll_ctrl.c | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/nimble/controller/src/ble_ll_ctrl.c
b/nimble/controller/src/ble_ll_ctrl.c
index 44ed510eb..a10ad294e 100644
--- a/nimble/controller/src/ble_ll_ctrl.c
+++ b/nimble/controller/src/ble_ll_ctrl.c
@@ -928,20 +928,6 @@ ble_ll_ctrl_phy_req_rsp_make(struct ble_ll_conn_sm
*connsm, uint8_t *ctrdata)
ctrdata[1] = connsm->phy_data.pref_mask_rx;
}
-#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
-/**
- * Create a LL_CLOCK_ACCURACY_REQ or LL_CLOCK_ACCURACY_RSP pdu
- *
- * @param connsm Pointer to connection state machine
- * @param ctrdata: Pointer to where CtrData starts in pdu
- */
-static void
-ble_ll_ctrl_sca_req_rsp_make(struct ble_ll_conn_sm *connsm, uint8_t *ctrdata)
-{
- ctrdata[0] = BLE_LL_SCA_ENUM;
-}
-#endif
-
static uint8_t
ble_ll_ctrl_rx_phy_req(struct ble_ll_conn_sm *connsm, uint8_t *req,
uint8_t *rsp)
@@ -1173,6 +1159,18 @@ ble_ll_ctrl_rx_periodic_sync_ind(struct ble_ll_conn_sm
*connsm, uint8_t *dptr)
#endif
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+/**
+ * Create a LL_CLOCK_ACCURACY_REQ or LL_CLOCK_ACCURACY_RSP pdu
+ *
+ * @param connsm Pointer to connection state machine
+ * @param ctrdata: Pointer to where CtrData starts in pdu
+ */
+static void
+ble_ll_ctrl_sca_req_rsp_make(struct ble_ll_conn_sm *connsm, uint8_t *ctrdata)
+{
+ ctrdata[0] = BLE_LL_SCA_ENUM;
+}
+
/**
* Called when a BLE_LL_CTRL_CLOCK_ACCURACY_REQ PDU is received
*