aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-03-05 11:45:46 +0100
committerpespin <pespin@sysmocom.de>2021-03-11 17:41:48 +0000
commit6a1a5f988bcb99135c169962a8ca7b77e61c5727 (patch)
tree95713713df55ca43e6b88d5f29d9a76cf0af575f
parentffce0e45a5289c7d094e24e2379e5cff91c36bf3 (diff)
l1sap: Transmit pdtch invalid MAC blocks to PCU
Similar to what we have been doing for TCH channels, we want to make sure all MAC blocks get to the upper layers, even if containing invalid data (flagging it with data_len=0) so that upper layers (osmo-pcu through PCUIF in this case) can rely on FN clock without gaps due to Rx errors. Related: OS#5020 Change-Id: I0b04b013b7bad5ff53d6a969ff0128b37f7f62d5
-rw-r--r--src/common/l1sap.c7
-rw-r--r--src/common/pcu_sock.c3
2 files changed, 4 insertions, 6 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 06006580..9bb8be30 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1530,12 +1530,9 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx,
return 1;
}
- /* don't send bad frames to PCU */
- if (len == 0)
- return -EINVAL;
- /* drop incomplete UL block */
+ /* Drop all data from incomplete UL block */
if (pr_info != PRES_INFO_BOTH)
- return 0;
+ len = 0;
/* PDTCH / PACCH frame handling */
pcu_tx_data_ind(&trx->ts[tn], PCU_IF_SAPI_PDTCH, fn, trx->arfcn,
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index ec7f876e..2d44e020 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -501,7 +501,8 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t sapi, uint32_t fn,
data_ind->ber10k = ber10k;
data_ind->ta_offs_qbits = bto;
data_ind->lqual_cb = lqual;
- memcpy(data_ind->data, data, len);
+ if (len)
+ memcpy(data_ind->data, data, len);
data_ind->len = len;
return pcu_sock_send(&bts_gsmnet, msg);