aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-11-06 17:33:31 +0700
committerlaforge <laforge@osmocom.org>2019-11-19 01:01:45 +0000
commitb37b3263a917aa554f99315e847f5accc470e10b (patch)
tree63a1f7ad18aa79c3c2afe4caf5e1f3905b6ed8fc /src/common
parentc693067b7e99a643da673cb3e2a36162cbd0f59c (diff)
osmo-bts-trx: general handling of NOPE / IDLE indications
Each logical channel can now optionally have an additional handler, that will be called when a NOPE / IDLE indication is received from the transceiver. The aim of that handler is to keep the logical channel state updated in case if one or more Uplink bursts are lost. Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637 Related: OS#3428
Diffstat (limited to 'src/common')
-rw-r--r--src/common/scheduler.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 3adfc498..fe93c32b 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -1349,6 +1349,13 @@ int trx_sched_ul_burst(struct l1sched_trx *l1t, struct trx_ul_burst_ind *bi)
l1cs = &l1ts->chan_state[chan];
func = trx_chan_desc[chan].ul_fn;
+ /* TODO: handle noise measurements */
+ if (chan == TRXC_IDLE && bi->flags & TRX_BI_F_NOPE_IND) {
+ LOGL1S(DL1P, LOGL_DEBUG, l1t, bi->tn, chan, bi->fn,
+ "Rx noise measurement (%d)\n", bi->rssi);
+ return -ENOTSUP;
+ }
+
/* check if channel is active */
if (!TRX_CHAN_IS_ACTIVE(l1cs, chan))
return -EINVAL;
@@ -1364,6 +1371,14 @@ int trx_sched_ul_burst(struct l1sched_trx *l1t, struct trx_ul_burst_ind *bi)
l1cs->last_tdma_fn = bi->fn;
l1cs->proc_tdma_fs++;
+ /* handle NOPE indications (if the handler is present) */
+ if (bi->flags & TRX_BI_F_NOPE_IND) {
+ func = trx_chan_desc[chan].nope_fn;
+ if (!func)
+ return 0;
+ return func(l1t, chan, bid, bi);
+ }
+
/* decrypt */
if (bi->burst_len && l1cs->ul_encr_algo) {
ubit_t ks[114];