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 2019/02/06 15:30:11 UTC

[mynewt-nimble] branch master updated: nimble/ll: Fix time restrictions on PHY transition in Master role

This is an automated email from the ASF dual-hosted git repository.

rymek 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 07a14c3  nimble/ll: Fix time restrictions on PHY transition in Master role
07a14c3 is described below

commit 07a14c38fb28ebc22468f95197f0ece11f996931
Author: Ɓukasz Rymanowski <lu...@codecoup.pl>
AuthorDate: Wed Feb 6 16:16:28 2019 +0100

    nimble/ll: Fix time restrictions on PHY transition in Master role
    
    Fix according to Bluetooth 5.0 Vol. 6 Part B 5.1.10.1
    
    This fixes LL/CON/MAS/BV-50-C
---
 nimble/controller/src/ble_ll_ctrl.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/nimble/controller/src/ble_ll_ctrl.c b/nimble/controller/src/ble_ll_ctrl.c
index d55245e..709209c 100644
--- a/nimble/controller/src/ble_ll_ctrl.c
+++ b/nimble/controller/src/ble_ll_ctrl.c
@@ -2640,16 +2640,17 @@ ble_ll_ctrl_tx_done(struct os_mbuf *txpdu, struct ble_ll_conn_sm *connsm)
 #endif
 #if (BLE_LL_BT5_PHY_SUPPORTED == 1)
     case BLE_LL_CTRL_PHY_REQ:
-        if (connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) {
-            if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_1M) {
-                connsm->phy_tx_transition = BLE_PHY_1M;
-            } else if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_2M) {
-                connsm->phy_tx_transition = BLE_PHY_2M;
-            } else if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_CODED) {
-                connsm->phy_tx_transition = BLE_PHY_CODED;
-            }
+        if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_1M) {
+            connsm->phy_tx_transition = BLE_PHY_1M;
+        } else if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_2M) {
+            connsm->phy_tx_transition = BLE_PHY_2M;
+        } else if (connsm->phy_data.req_pref_tx_phys_mask & BLE_PHY_MASK_CODED) {
+            connsm->phy_tx_transition = BLE_PHY_CODED;
         }
         break;
+    case BLE_LL_CTRL_PHY_UPDATE_IND:
+         connsm->phy_tx_transition = txpdu->om_data[2];
+        break;
 #endif
     default:
         break;