diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-01-15 17:53:02 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-01-15 17:53:02 +0700 |
commit | 566f6746bd4b78e5852073c9d1c46d8041d9f1b7 (patch) | |
tree | 10e00e9dc3040aeadceeea83c58565a05ecb63e6 /src | |
parent | 59d20f6d5ea402cf0ad69ef8c372dd3e683f3941 (diff) |
trxcon/sched_trx.c: use bool in sched_trx_reset()
Change-Id: I4f6990520836edb5eecce38c04857a4b3bc6f2fc
Diffstat (limited to 'src')
-rw-r--r-- | src/host/trxcon/l1ctl.c | 6 | ||||
-rw-r--r-- | src/host/trxcon/sched_trx.c | 5 | ||||
-rw-r--r-- | src/host/trxcon/sched_trx.h | 2 | ||||
-rw-r--r-- | src/host/trxcon/trxcon.c | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index 02aa3fa6..a2ced465 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -345,7 +345,7 @@ static int l1ctl_rx_fbsb_req(struct l1ctl_link *l1l, struct msgb *msg) band_arfcn &~ ARFCN_FLAG_MASK); /* Reset scheduler and clock counter */ - sched_trx_reset(l1l->trx, 1); + sched_trx_reset(l1l->trx, true); /* Configure a single timeslot */ sched_trx_configure_ts(l1l->trx, 0, ch_config); @@ -431,7 +431,7 @@ static int l1ctl_rx_reset_req(struct l1ctl_link *l1l, struct msgb *msg) /* Fall through */ case L1CTL_RES_T_SCHED: - sched_trx_reset(l1l->trx, 1); + sched_trx_reset(l1l->trx, true); break; default: LOGP(DL1C, LOGL_ERROR, "Unknown L1CTL_RESET_REQ type\n"); @@ -674,7 +674,7 @@ static int l1ctl_rx_dm_rel_req(struct l1ctl_link *l1l, struct msgb *msg) "switching back to CCCH\n"); /* Reset scheduler */ - sched_trx_reset(l1l->trx, 0); + sched_trx_reset(l1l->trx, false); msgb_free(msg); return 0; diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 19d1fe82..18516d31 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -2,7 +2,7 @@ * OsmocomBB <-> SDR connection bridge * TDMA scheduler: GSM PHY routines * - * (C) 2017 by Vadim Yanitskiy <axilirator@gmail.com> + * (C) 2017-2019 by Vadim Yanitskiy <axilirator@gmail.com> * * All Rights Reserved * @@ -26,6 +26,7 @@ #include <errno.h> #include <string.h> #include <talloc.h> +#include <stdbool.h> #include <osmocom/gsm/a5.h> #include <osmocom/core/bits.h> @@ -160,7 +161,7 @@ int sched_trx_shutdown(struct trx_instance *trx) return 0; } -int sched_trx_reset(struct trx_instance *trx, int reset_clock) +int sched_trx_reset(struct trx_instance *trx, bool reset_clock) { int i; diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index b7236d51..f914eee9 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -263,7 +263,7 @@ const struct trx_multiframe *sched_mframe_layout( /* Scheduler management functions */ int sched_trx_init(struct trx_instance *trx, uint32_t fn_advance); -int sched_trx_reset(struct trx_instance *trx, int reset_clock); +int sched_trx_reset(struct trx_instance *trx, bool reset_clock); int sched_trx_shutdown(struct trx_instance *trx); /* Timeslot management functions */ diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c index 251321d2..874f893b 100644 --- a/src/host/trxcon/trxcon.c +++ b/src/host/trxcon/trxcon.c @@ -93,7 +93,7 @@ static void trxcon_fsm_managed_action(struct osmo_fsm_inst *fi, if (app_data.trx->fsm->state != TRX_STATE_OFFLINE) { /* Reset scheduler and clock counter */ - sched_trx_reset(app_data.trx, 1); + sched_trx_reset(app_data.trx, true); /* TODO: implement trx_if_reset() */ trx_if_cmd_poweroff(app_data.trx); |