TRX: scheduler: don't access l1h->config from scheduler

This commit is contained in:
Harald Welte 2016-01-09 23:03:34 +01:00
parent 11db925f15
commit b6b42d150d
3 changed files with 6 additions and 1 deletions

View File

@ -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 */

View File

@ -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;
}

View File

@ -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 */