diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-06-15 20:19:08 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-06-15 20:55:23 +0700 |
commit | b828b32f31366e7b306980cb568622d36fbc80fb (patch) | |
tree | fc1f9d128ede57623d0bb8b53faf9ad852138e7e /src/common/scheduler.c | |
parent | ae781bc5cd012818dd50ab5c1f79236422029003 (diff) |
osmo-bts-trx: store pointer to gsm_lchan in l1sched_chan_state
This change simplifies access to generic logical channel state
(struct gsm_lchan) from osmo-bts-trx specific state (struct
l1sched_chan_state), so there is no need to look it up using
get_lchan_by_chan_nr() on receipt of each Uplink burst.
Change-Id: Ic4378020f980845b962f71b9e4b7faea738bc174
Diffstat (limited to 'src/common/scheduler.c')
-rw-r--r-- | src/common/scheduler.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/scheduler.c b/src/common/scheduler.c index ed6c6232..b79c83db 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -1000,6 +1000,11 @@ int trx_sched_set_lchan(struct l1sched_trx *l1t, uint8_t chan_nr, uint8_t link_i else chan_state->ho_rach_detect = 0; chan_state->active = active; + + if (active) { + chan_state->lchan = get_lchan_by_chan_nr(l1t->trx, chan_nr); + OSMO_ASSERT(chan_state->lchan != NULL); + } } } |