aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/tch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osmo-bts-sysmo/tch.c')
-rw-r--r--src/osmo-bts-sysmo/tch.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c
index 6333d195..b65628f0 100644
--- a/src/osmo-bts-sysmo/tch.c
+++ b/src/osmo-bts-sysmo/tch.c
@@ -514,9 +514,12 @@ int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg)
return -EAGAIN;
if (data_ind->msgUnitParam.u8Size < 1) {
- LOGP(DL1C, LOGL_ERROR, "chan_nr %d Rx Payload size 0\n",
- chan_nr);
- return -EINVAL;
+ LOGP(DL1P, LOGL_DEBUG, "chan_nr %d Rx Payload size 0\n", chan_nr);
+ /* Push empty payload to upper layers */
+ rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP");
+ return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn,
+ data_ind->measParam.fBer * 10000,
+ data_ind->measParam.fLinkQuality * 10);
}
payload_type = data_ind->msgUnitParam.u8Buffer[0];
@@ -605,11 +608,13 @@ int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg)
return 0;
rmsg = l1_to_rtppayload_amr(sid_first, len, lchan);
break;
+ /* FIXME: what about GsmL1_TchPlType_Amr_SidBad? not well documented. */
}
if (rmsg)
- return add_l1sap_header(trx, rmsg, lchan, chan_nr,
- data_ind->u32Fn);
+ return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn,
+ data_ind->measParam.fBer * 10000,
+ data_ind->measParam.fLinkQuality * 10);
return 0;