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 2021/04/01 09:26:11 UTC

[mynewt-nimble] branch master updated: nimble/phy/cmac: Fix return value for RX late start

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


The following commit(s) were added to refs/heads/master by this push:
     new 1b09cf2  nimble/phy/cmac: Fix return value for RX late start
1b09cf2 is described below

commit 1b09cf2a7624d5f3f83d3d922113a094efb00aeb
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Sat Mar 20 14:30:29 2021 +0100

    nimble/phy/cmac: Fix return value for RX late start
    
    This does not affect current code, but we should return proper code if
    RX was late anyway.
---
 nimble/drivers/dialog_cmac/src/ble_phy.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nimble/drivers/dialog_cmac/src/ble_phy.c b/nimble/drivers/dialog_cmac/src/ble_phy.c
index ab0f885..74c67b6 100644
--- a/nimble/drivers/dialog_cmac/src/ble_phy.c
+++ b/nimble/drivers/dialog_cmac/src/ble_phy.c
@@ -1369,6 +1369,7 @@ ble_phy_rx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
 {
     uint32_t ll_val32;
     int32_t time_till_start;
+    int rc = 0;
 
     MCU_DIAG_SER('r');
 
@@ -1404,11 +1405,12 @@ ble_phy_rx_set_start_time(uint32_t cputime, uint8_t rem_usecs)
             /* We missed start. Start now */
             CMAC->CM_EV_LINKUP_REG =
                 CMAC_CM_EV_LINKUP_REG_LU_FRAME_START_2_ASAP_Msk;
+            rc = BLE_PHY_ERR_RX_LATE;
         }
     }
     __enable_irq();
 
-    return 0;
+    return rc;
 }
 
 int