summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-01-15 17:53:02 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-01-15 17:53:02 +0700
commit566f6746bd4b78e5852073c9d1c46d8041d9f1b7 (patch)
tree10e00e9dc3040aeadceeea83c58565a05ecb63e6
parent59d20f6d5ea402cf0ad69ef8c372dd3e683f3941 (diff)
trxcon/sched_trx.c: use bool in sched_trx_reset()
-rw-r--r--src/host/trxcon/l1ctl.c6
-rw-r--r--src/host/trxcon/sched_trx.c5
-rw-r--r--src/host/trxcon/sched_trx.h2
-rw-r--r--src/host/trxcon/trxcon.c2
4 files changed, 8 insertions, 7 deletions
diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index 02aa3fa..a2ced46 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 19d1fe8..18516d3 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 b7236d5..f914eee 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 251321d..874f893 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);