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/02/08 11:13:54 UTC
[mynewt-nimble] branch master updated (aaab1d6 -> 9ebd589)
This is an automated email from the ASF dual-hosted git repository.
andk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git.
from aaab1d6 nimble/ll: Fix build
new 3596504 nimble/ll: Fix sca update handling
new 9ebd589 nimble/ll: Fix sca hci command parsing
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
nimble/controller/src/ble_ll_conn_hci.c | 2 +-
nimble/controller/src/ble_ll_ctrl.c | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
[mynewt-nimble] 02/02: nimble/ll: Fix sca hci command parsing
Posted by an...@apache.org.
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 9ebd589701071a1501e2b1ba3f1fad807dfa421c
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Mon Feb 7 13:12:54 2022 +0100
nimble/ll: Fix sca hci command parsing
---
nimble/controller/src/ble_ll_conn_hci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nimble/controller/src/ble_ll_conn_hci.c b/nimble/controller/src/ble_ll_conn_hci.c
index 2e50713..bee9a56 100644
--- a/nimble/controller/src/ble_ll_conn_hci.c
+++ b/nimble/controller/src/ble_ll_conn_hci.c
@@ -1619,7 +1619,7 @@ ble_ll_conn_req_peer_sca(const uint8_t *cmdbuf, uint8_t len,
const struct ble_hci_le_request_peer_sca_cp *params = (const void *)cmdbuf;
struct ble_ll_conn_sm *connsm;
- connsm = ble_ll_conn_find_active_conn(params->conn_handle);
+ connsm = ble_ll_conn_find_active_conn(le16toh(params->conn_handle));
if (!connsm) {
return BLE_ERR_UNK_CONN_ID;
}
[mynewt-nimble] 01/02: nimble/ll: Fix sca update handling
Posted by an...@apache.org.
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 3596504a10ff6b1a8c65c6e22bb6a34bbb3cb581
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Sat Feb 5 12:26:39 2022 +0100
nimble/ll: Fix sca update handling
We should use new sca in connsm...
---
nimble/controller/src/ble_ll_ctrl.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/nimble/controller/src/ble_ll_ctrl.c b/nimble/controller/src/ble_ll_ctrl.c
index 78cf075..919f4a5 100644
--- a/nimble/controller/src/ble_ll_ctrl.c
+++ b/nimble/controller/src/ble_ll_ctrl.c
@@ -1110,7 +1110,12 @@ static uint8_t
ble_ll_ctrl_rx_sca_req(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
uint8_t *rsp)
{
+ if (connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) {
+ connsm->master_sca = dptr[0];
+ }
+
ble_ll_ctrl_sca_req_rsp_make(connsm, rsp);
+
return BLE_LL_CTRL_CLOCK_ACCURACY_RSP;
}
@@ -1128,8 +1133,14 @@ ble_ll_ctrl_rx_sca_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
if (connsm->cur_ctrl_proc != BLE_LL_CTRL_PROC_SCA_UPDATE) {
return BLE_LL_CTRL_UNKNOWN_RSP;
}
+
+ if (connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) {
+ connsm->master_sca = dptr[0];
+ }
+
ble_ll_ctrl_proc_stop(connsm, BLE_LL_CTRL_PROC_SCA_UPDATE);
ble_ll_hci_ev_sca_update(connsm, BLE_ERR_SUCCESS, dptr[0]);
+
return BLE_ERR_MAX;
}