From 80e04e4fd1e263988c4618a745867227cc978f95 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 10 Nov 2016 20:53:10 +0200 Subject: [PATCH] Bluetooth: Use k_uptime_get() instead of deprecated sys_tick_get_32() Switch to using k_uptime_get() instead of the deprecated sys_tick_get_32() API. Change-Id: I737ef0153eff9d283bae840ff5177f8132396e1b Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/hci_core.c | 2 +- subsys/bluetooth/host/monitor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/host/hci_core.c b/subsys/bluetooth/host/hci_core.c index 1b2a795937b..c3e22d560ed 100644 --- a/subsys/bluetooth/host/hci_core.c +++ b/subsys/bluetooth/host/hci_core.c @@ -2354,7 +2354,7 @@ static int prng_reseed(struct tc_hmac_prng_struct *h) net_buf_unref(rsp); } - extra = sys_tick_get(); + extra = k_uptime_get(); ret = tc_hmac_prng_reseed(h, seed, sizeof(seed), (uint8_t *)&extra, sizeof(extra)); diff --git a/subsys/bluetooth/host/monitor.c b/subsys/bluetooth/host/monitor.c index a3d0235b18f..10274077662 100644 --- a/subsys/bluetooth/host/monitor.c +++ b/subsys/bluetooth/host/monitor.c @@ -65,7 +65,7 @@ static inline void encode_hdr(struct bt_monitor_hdr *hdr, uint16_t opcode, /* Extended header */ hdr->type = BT_MONITOR_TS32; - ts32 = sys_tick_get_32() * sys_clock_us_per_tick / 100; + ts32 = k_uptime_get() * 10; hdr->ts32 = sys_cpu_to_le32(ts32); }