From 05e5db74cf79f5cc753dd922f461f78abf3ff7a9 Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Mon, 6 Apr 2020 13:20:03 +0200 Subject: [PATCH] Bluetooth: controller: Convert bluetooth controller to using k_timeout_t Convert bluetooth controller to using the new k_timeout_t API so that CONFIG_LEGACY_TIMEOUT_API can be turned off. Signed-off-by: Joakim Andersson --- subsys/bluetooth/controller/hci/hci_driver.c | 2 +- subsys/bluetooth/controller/ll_sw/ll_filter.c | 4 ++-- subsys/bluetooth/controller/ll_sw/ull_filter.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/subsys/bluetooth/controller/hci/hci_driver.c b/subsys/bluetooth/controller/hci/hci_driver.c index bdf29c3ec9f..948060fa6d7 100644 --- a/subsys/bluetooth/controller/hci/hci_driver.c +++ b/subsys/bluetooth/controller/hci/hci_driver.c @@ -355,7 +355,7 @@ static void recv_thread(void *p1, void *p2, void *p3) events[0].signal->signaled = 0U; } else if (events[1].state == K_POLL_STATE_FIFO_DATA_AVAILABLE) { - node_rx = k_fifo_get(events[1].fifo, 0); + node_rx = k_fifo_get(events[1].fifo, K_NO_WAIT); } events[0].state = K_POLL_STATE_NOT_READY; diff --git a/subsys/bluetooth/controller/ll_sw/ll_filter.c b/subsys/bluetooth/controller/ll_sw/ll_filter.c index 685ee1c8185..8866267d1ee 100644 --- a/subsys/bluetooth/controller/ll_sw/ll_filter.c +++ b/subsys/bluetooth/controller/ll_sw/ll_filter.c @@ -688,13 +688,13 @@ void ll_rl_rpa_update(bool timeout) static void rpa_timeout(struct k_work *work) { ll_rl_rpa_update(true); - k_delayed_work_submit(&rpa_work, rpa_timeout_ms); + k_delayed_work_submit(&rpa_work, K_MSEC(rpa_timeout_ms)); } static void rpa_refresh_start(void) { BT_DBG(""); - k_delayed_work_submit(&rpa_work, rpa_timeout_ms); + k_delayed_work_submit(&rpa_work, K_MSEC(rpa_timeout_ms)); } static void rpa_refresh_stop(void) diff --git a/subsys/bluetooth/controller/ll_sw/ull_filter.c b/subsys/bluetooth/controller/ll_sw/ull_filter.c index 0bfb4d1f4f5..b0bddffb317 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_filter.c +++ b/subsys/bluetooth/controller/ll_sw/ull_filter.c @@ -1022,13 +1022,13 @@ static int rl_access_check(bool check_ar) static void rpa_timeout(struct k_work *work) { ull_filter_rpa_update(true); - k_delayed_work_submit(&rpa_work, rpa_timeout_ms); + k_delayed_work_submit(&rpa_work, K_MSEC(rpa_timeout_ms)); } static void rpa_refresh_start(void) { BT_DBG(""); - k_delayed_work_submit(&rpa_work, rpa_timeout_ms); + k_delayed_work_submit(&rpa_work, K_MSEC(rpa_timeout_ms)); } static void rpa_refresh_stop(void)