Change in osmo-bts[master]: bts-trx: Always submit rx PDTCH DATA.ind to l1sap

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Mar 11 17:41:49 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/23257 )

Change subject: bts-trx: Always submit rx PDTCH DATA.ind to l1sap
......................................................................

bts-trx: Always submit rx PDTCH DATA.ind to l1sap

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: I343c7a721dab72411edbca816c8864926bc329fb
---
M src/common/scheduler.c
M src/osmo-bts-trx/sched_lchan_pdtch.c
2 files changed, 18 insertions(+), 6 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 3d780fd..c7c3e62 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -1411,7 +1411,6 @@
 	/* handle NOPE indications */
 	if (bi->flags & TRX_BI_F_NOPE_IND) {
 		switch (chan) {
-		case TRXC_PDTCH:
 		case TRXC_PTCCH:
 		case TRXC_RACH:
 			/* For some logical channel types NOPE.ind is valueless. */
diff --git a/src/osmo-bts-trx/sched_lchan_pdtch.c b/src/osmo-bts-trx/sched_lchan_pdtch.c
index 28a45f5..665f643 100644
--- a/src/osmo-bts-trx/sched_lchan_pdtch.c
+++ b/src/osmo-bts-trx/sched_lchan_pdtch.c
@@ -53,6 +53,7 @@
 	int n_bits_total = 0;
 	uint16_t ber10k;
 	int rc;
+	enum osmo_ph_pres_info_type presence_info;
 
 	LOGL1S(DL1P, LOGL_DEBUG, l1t, bi->tn, chan, bi->fn,
 		"Received PDTCH bid=%u\n", bid);
@@ -79,16 +80,24 @@
 	trx_sched_meas_push(chan_state, bi);
 
 	/* copy burst to buffer of 4 bursts */
-	if (bi->burst_len == EGPRS_BURST_LEN) {
+	switch (bi->burst_len) {
+	case EGPRS_BURST_LEN:
 		burst = *bursts_p + bid * 348;
 		memcpy(burst, bi->burst + 9, 174);
 		memcpy(burst + 174, bi->burst + 261, 174);
 		n_bursts_bits = GSM0503_EGPRS_BURSTS_NBITS;
-	} else {
+		break;
+	case GSM_BURST_LEN:
 		burst = *bursts_p + bid * 116;
 		memcpy(burst, bi->burst + 3, 58);
 		memcpy(burst + 58, bi->burst + 87, 58);
 		n_bursts_bits = GSM0503_GPRS_BURSTS_NBITS;
+		break;
+	case 0:
+		/* NOPE.ind, assume GPRS? */
+		burst = *bursts_p + bid * 116;
+		memset(burst, 0, 116);
+		n_bursts_bits = GSM0503_GPRS_BURSTS_NBITS;
 	}
 
 	/* wait until complete set of bursts */
@@ -120,19 +129,23 @@
 				  &n_errors, &n_bits_total);
 	}
 
-	if (rc <= 0) {
+	if (rc > 0) {
+		presence_info = PRES_INFO_BOTH;
+	} else {
 		LOGL1S(DL1P, LOGL_DEBUG, l1t, bi->tn, chan, bi->fn,
 			"Received bad PDTCH (%u/%u)\n",
 			bi->fn % l1ts->mf_period, l1ts->mf_period);
-		return 0;
+		rc = 0;
+		presence_info = PRES_INFO_INVALID;
 	}
 
 	ber10k = compute_ber10k(n_bits_total, n_errors);
+
 	return _sched_compose_ph_data_ind(l1t, bi->tn,
 					  *first_fn, chan, l2, rc,
 					  meas_avg.rssi, meas_avg.toa256,
 					  meas_avg.ci_cb, ber10k,
-					  PRES_INFO_BOTH);
+					  presence_info);
 }
 
 /* obtain a to-be-transmitted PDTCH (packet data) burst */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/23257
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I343c7a721dab72411edbca816c8864926bc329fb
Gerrit-Change-Number: 23257
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210311/f515129a/attachment.htm>


More information about the gerrit-log mailing list