aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-01-09 23:03:34 +0100
committerHarald Welte <laforge@gnumonks.org>2016-02-15 14:17:55 +0100
commitb6b42d150db5ef707ad17b0005d7de8f0f538390 (patch)
tree8f27ad966fe899a94ffaf6222f426111eb2f349c /src
parent11db925f156ddce72cca09275fc2d270efda049b (diff)
TRX: scheduler: don't access l1h->config from scheduler
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bts-trx/scheduler.c2
-rw-r--r--src/osmo-bts-trx/trx_if.c4
-rw-r--r--src/osmo-bts-trx/trx_if.h1
3 files changed, 6 insertions, 1 deletions
diff --git a/src/osmo-bts-trx/scheduler.c b/src/osmo-bts-trx/scheduler.c
index 33f4f7f2..d4af2b70 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 fef2064b..16c9fc70 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 ac0ee42c..3862e2be 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 */