You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/09/05 11:56:28 UTC

[GitHub] andrzej-kaczmarek closed pull request #179: nimble/ll/dtm: Reschedule late TX PDU

andrzej-kaczmarek closed pull request #179: nimble/ll/dtm: Reschedule late TX PDU
URL: https://github.com/apache/mynewt-nimble/pull/179
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nimble/controller/src/ble_ll_dtm.c b/nimble/controller/src/ble_ll_dtm.c
index 964e7c78..28178a9a 100644
--- a/nimble/controller/src/ble_ll_dtm.c
+++ b/nimble/controller/src/ble_ll_dtm.c
@@ -200,16 +200,24 @@ ble_ll_dtm_tx_sched_cb(struct ble_ll_sched_item *sch)
 
     sch->start_time += g_ble_ll_sched_offset_ticks;
 
-    /*XXX Maybe reschedule if too late */
     rc = ble_phy_tx_set_start_time(sch->start_time, sch->remainder);
-    BLE_LL_ASSERT(rc == 0);
+    if (rc) {
+        goto resched;
+    }
 
     rc = ble_phy_tx(ble_ll_tx_mbuf_pducb, ctx->om, BLE_PHY_TRANSITION_NONE);
-    BLE_LL_ASSERT(rc == 0);
+    if (rc) {
+        goto resched;
+    }
 
     ble_ll_state_set(BLE_LL_STATE_DTM);
 
     return BLE_LL_SCHED_STATE_DONE;
+
+resched:
+    /* Reschedule from LL task if late for this PDU */
+    ble_npl_eventq_put(&g_ble_ll_data.ll_evq, &ctx->evt);
+    return BLE_LL_SCHED_STATE_DONE;
 }
 
 static void


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services