From: Harald Welte <laforge(a)gnumonks.org>
---
src/osmo-bts-trx/scheduler.c | 2 +-
src/osmo-bts-trx/trx_if.c | 4 ++++
src/osmo-bts-trx/trx_if.h | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/osmo-bts-trx/scheduler.c b/src/osmo-bts-trx/scheduler.c
index 33f4f7f..d4af2b7 100644
--- a/src/osmo-bts-trx/scheduler.c
+++ b/src/osmo-bts-trx/scheduler.c
@@ -1660,7 +1660,7 @@ static int trx_sched_fn(uint32_t fn)
struct l1sched_trx *l1t = trx_l1sched_hdl(trx);
/* we don't schedule, if power is off */
- if (!l1h->config.poweron)
+ if (!trx_if_powered(l1h))
continue;
/* process every TS of TRX */
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index fef2064..16c9fc7 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -558,3 +558,7 @@ void trx_if_close(struct trx_l1h *l1h)
trx_udp_close(&l1h->trx_ofd_data);
}
+int trx_if_powered(struct trx_l1h *l1h)
+{
+ return l1h->config.poweron;
+}
diff --git a/src/osmo-bts-trx/trx_if.h b/src/osmo-bts-trx/trx_if.h
index ac0ee42..3862e2b 100644
--- a/src/osmo-bts-trx/trx_if.h
+++ b/src/osmo-bts-trx/trx_if.h
@@ -31,5 +31,6 @@ int trx_if_data(struct trx_l1h *l1h, uint8_t tn, uint32_t fn, uint8_t
pwr,
int trx_if_open(struct trx_l1h *l1h);
void trx_if_flush(struct trx_l1h *l1h);
void trx_if_close(struct trx_l1h *l1h);
+int trx_if_powered(struct trx_l1h *l1h);
#endif /* TRX_IF_H */
--
2.7.0