pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bts/+/23249 )
Change subject: l1sap: Transmit pdtch invalid MAC blocks to PCU
......................................................................
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
---
M src/common/l1sap.c
M src/common/pcu_sock.c
2 files changed, 4 insertions(+), 6 deletions(-)
Approvals:
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 0600658..9bb8be3 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1530,12 +1530,9 @@
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 ec7f876..2d44e02 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -501,7 +501,8 @@
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);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/23249
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I0b04b013b7bad5ff53d6a969ff0128b37f7f62d5
Gerrit-Change-Number: 23249
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged