aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/l1sap.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-02-14 16:00:40 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2020-02-17 12:40:07 +0100
commit51845765727ddf994f4ccea38bee9490f2d5a95f (patch)
treec3e21bd9752ae45007313583e146c16e321280b3 /src/common/l1sap.c
parentac61baed2e8acc5faef57ee37f0d125eadd7f8ee (diff)
osmo-bts-sysmo: merge measurement data and payload
For osmo-bts-sysmo the MPH INFO MEAS IND indication is still sent separately. Lets merge the measurement information into the PH DATA Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Related: OS#2977
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r--src/common/l1sap.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 0b51045f..05dbb6f8 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -176,9 +176,15 @@ struct msgb *l1sap_msgb_alloc(unsigned int l2_len)
return msg;
}
+/* Enclose rmsg into an osmo_phsap primitive and hand it over to the higher
+ * layers. The phsap primitive also contains measurement information. The
+ * parameters rssi, ta_offs and is_sub are only needed when the measurement
+ * information is passed along with the TCH data. When separate measurement
+ * indications are used, those last three parameters may be set to zero. */
int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg,
struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn,
- uint16_t ber10k, int16_t lqual_cb)
+ uint16_t ber10k, int16_t lqual_cb, int8_t rssi,
+ int16_t ta_offs, uint8_t is_sub)
{
struct osmo_phsap_prim *l1sap;
@@ -194,6 +200,10 @@ int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg,
l1sap->u.tch.ber10k = ber10k;
l1sap->u.tch.lqual_cb = lqual_cb;
+ l1sap->u.tch.rssi = rssi;
+ l1sap->u.tch.ta_offs_256bits = ta_offs;
+ l1sap->u.tch.is_sub = is_sub;
+
return l1sap_up(trx, l1sap);
}