You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ry...@apache.org on 2017/05/11 13:42:16 UTC

[4/5] incubator-mynewt-core git commit: nimble/ll: Check peer features for LE Connection Update

nimble/ll: Check peer features for LE Connection Update

We should use Connection Parameters Request procedure only if both
master and slave support this feature so we need to check features
masks of both sides.

In other case, we can do Connection Update procedure only if we're
master.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/80793bf6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/80793bf6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/80793bf6

Branch: refs/heads/master
Commit: 80793bf6e36e13953fce18950929af5e91867d12
Parents: fb476e7
Author: Andrzej Kaczmarek <an...@codecoup.pl>
Authored: Tue Apr 25 20:00:20 2017 +0200
Committer: Andrzej Kaczmarek <an...@codecoup.pl>
Committed: Thu May 11 10:48:20 2017 +0200

----------------------------------------------------------------------
 net/nimble/controller/src/ble_ll_conn_hci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/80793bf6/net/nimble/controller/src/ble_ll_conn_hci.c
----------------------------------------------------------------------
diff --git a/net/nimble/controller/src/ble_ll_conn_hci.c b/net/nimble/controller/src/ble_ll_conn_hci.c
index bd235e7..cfa603e 100644
--- a/net/nimble/controller/src/ble_ll_conn_hci.c
+++ b/net/nimble/controller/src/ble_ll_conn_hci.c
@@ -610,8 +610,8 @@ ble_ll_conn_hci_update(uint8_t *cmdbuf)
         return BLE_ERR_CMD_DISALLOWED;
     }
 
-    /* See if we support this feature */
-    if ((ble_ll_read_supp_features() & BLE_LL_FEAT_CONN_PARM_REQ) == 0) {
+    /* See if this feature is supported on both sides */
+    if ((connsm->common_features & BLE_LL_FEAT_CONN_PARM_REQ) == 0) {
         if (connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) {
             return BLE_ERR_UNKNOWN_HCI_CMD;
         }