aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/scheduler.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-10-31 09:36:17 +0100
committerlaforge <laforge@osmocom.org>2020-01-20 14:35:19 +0000
commitd4f67591c77dd011bb4886d92565fb5014437330 (patch)
treeeffe95a8b5b46716fe6aff5448e217e6df9c4894 /src/common/scheduler.c
parent8969adc5d940e32031ade68e4eb2fdf7ac4e17d0 (diff)
l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCH
The MPH INFO MEAS IND indication, which contains the uplink measurement data is sent in parallel to the PH DATA and TCH indications as a separate indications. This makes the overall uplink measurement data processing unnecessarly complex. So lets put the data that is relevant for measurement into the PH DATA and TCH indications directly. This change only affects osmo-bts-trx at the moment. In order to keep the upper layers (l1sap.c) compatible we add an autodection to switch between separate measurement indications and included measurement data. Related: OS#2977 Depends: libosmocore I2c34b02d329f9df190c5035c396403ca0a4f9c42 Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84
Diffstat (limited to 'src/common/scheduler.c')
-rw-r--r--src/common/scheduler.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 3713b063..e8df5373 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -753,7 +753,8 @@ int _sched_compose_ph_data_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
}
int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
- enum trx_chan_type chan, uint8_t *tch, uint8_t tch_len)
+ enum trx_chan_type chan, uint8_t *tch, uint8_t tch_len,
+ int16_t ta_offs_256bits, uint16_t ber10k, float rssi)
{
struct msgb *msg;
struct osmo_phsap_prim *l1sap;
@@ -769,6 +770,10 @@ int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
PRIM_OP_INDICATION, msg);
l1sap->u.tch.chan_nr = chan_nr;
l1sap->u.tch.fn = fn;
+ l1sap->u.tch.rssi = (int8_t) (rssi);
+ l1sap->u.tch.ber10k = ber10k;
+ l1sap->u.tch.ta_offs_256bits = ta_offs_256bits;
+
msg->l2h = msgb_put(msg, tch_len);
if (tch_len)
memcpy(msg->l2h, tch, tch_len);