summaryrefslogtreecommitdiff
path: root/src/libs/mynewt-nimble/nimble
diff options
context:
space:
mode:
authorDaniel Jackson <email@danieljackson.co.uk>2021-09-25 23:48:53 +0100
committerGitHub <noreply@github.com>2021-09-25 23:48:53 +0100
commitd7ca217872307357200e32ad679786d8f3396ca0 (patch)
tree67b299ce13cf4b47211a3f02a0a39e1e581bd981 /src/libs/mynewt-nimble/nimble
parent8a2b86dc8376d915b664a301465f7a5ef675b66f (diff)
Correctly return the tick at which the RF will be fully enabled.
Always returning 0 (when `MYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME` is not defined), rather than a time near to the current tick, causes an issue in at least one place: `ble_ll_adv_sm_start()`, where the calculation of `delta` overflows when the system timer is at 0x80000000 or above -- causing an incorrect, huge adjustment to be made to the scheduled time, ultimately stopping adverts from being sent.
Diffstat (limited to 'src/libs/mynewt-nimble/nimble')
-rw-r--r--src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_rfmgmt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_rfmgmt.h b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_rfmgmt.h
index 37b81a88..5e2d636f 100644
--- a/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_rfmgmt.h
+++ b/src/libs/mynewt-nimble/nimble/controller/include/controller/ble_ll_rfmgmt.h
@@ -51,7 +51,7 @@ static inline void ble_ll_rfmgmt_reset(void) { }
static inline void ble_ll_rfmgmt_scan_changed(bool e, uint32_t n) { }
static inline void ble_ll_rfmgmt_sched_changed(struct ble_ll_sched_item *f) { }
static inline void ble_ll_rfmgmt_release(void) { }
-static inline uint32_t ble_ll_rfmgmt_enable_now(void) { return 0; }
+static inline uint32_t ble_ll_rfmgmt_enable_now(void) { return os_cputime_get32(); }
static inline bool ble_ll_rfmgmt_is_enabled(void) { return true; }
#endif