From f588b5f91d78d7cf1fc01d657b8483d3908c8841 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 30 Jun 2017 15:19:00 +0200 Subject: Allow passing low link quality buffers to upper layers We want to always call l1if_tch_rx and l1sap_up in order to avoid losing triggering events on the upper layer. With this change, the upper layer will increase correctly seq + ts for RTP. It will then send an RTP packet with only the header and no payload, which is not correct but at least we avoid drifting the RTP clock. Upcoming patch in the series solves this issue. This patch assumes that we are not lossing data events from the physical layer and that we receive an event every 20ms, even if the MS is not transmitting due to DTX. Depends on libosmocore If4ae20c22b881e94585dad710f17b9e37f77bf82 Change-Id: If5df8940fab833eb4e3ed851880b66987d356031 --- src/osmo-bts-litecell15/tch.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/osmo-bts-litecell15/tch.c') diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index a29733f1..c61712f1 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -369,9 +369,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]; @@ -459,8 +462,9 @@ int l1if_tch_rx(struct gsm_bts_trx *trx, uint8_t chan_nr, struct msgb *l1p_msg) } 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; -- cgit v1.2.3