[MERGED] osmo-bts[master]: Add DTXd support for sysmoBTS and LC15

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Jun 12 15:42:34 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: Add DTXd support for sysmoBTS and LC15
......................................................................


Add DTXd support for sysmoBTS and LC15

* set/clear DTXd activity indicator for measurement reporting
* set DTXd status based on information from RSL

Related: OS#1563
Change-Id: I148a75725c4e5089b6f2da6e9adcbe94170d3257
Depends-On: I4a033b03fcd0deb4db7a38273b5407511dbf1d6c
Reviewed-on: https://gerrit.osmocom.org/220
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <laforge at gnumonks.org>
---
M src/common/rsl.c
M src/osmo-bts-litecell15/l1_if.c
M src/osmo-bts-sysmo/l1_if.c
3 files changed, 11 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index e13d48c..dddde69 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -103,6 +103,8 @@
 				     struct rsl_ie_chan_mode *cm)
 {
 	lchan->rsl_cmode = cm->spd_ind;
+	lchan->ts->trx->bts->dtxd = (cm->dtx_dtu & RSL_CMOD_DTXd) ? true : false;
+
 	switch (cm->chan_rate) {
 	case RSL_CMOD_SP_GSM1:
 		lchan->tch_mode = GSM48_CMODE_SPEECH_V1;
@@ -1694,8 +1696,7 @@
 }
 
 /* 8.4.8 MEASUREMENT RESult */
-static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len,
-			   bool dtxd_used)
+static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len)
 {
 	struct msgb *msg;
 	uint8_t meas_res[16];
@@ -1713,8 +1714,10 @@
 		return -ENOMEM;
 
 	msgb_tv_put(msg, RSL_IE_MEAS_RES_NR, lchan->meas.res_nr++);
-	size_t ie_len = gsm0858_rsl_ul_meas_enc(&lchan->meas.ul_res, dtxd_used,
+	size_t ie_len = gsm0858_rsl_ul_meas_enc(&lchan->meas.ul_res,
+						lchan->tch.dtxd_active,
 						meas_res);
+	lchan->tch.dtxd_active = false;
 	if (ie_len >= 3) {
 		msgb_tlv_put(msg, RSL_IE_UPLINK_MEAS, ie_len, meas_res);
 		lchan->meas.flags &= ~LC_UL_M_F_RES_VALID;
@@ -1755,9 +1758,7 @@
 
 		LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n",
 			gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type));
-		/* FIXME: add dtx downlink support */
-		rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg),
-				     false);
+		rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg));
 		msgb_free(msg);
 		return rc;
 	} else {
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index 6a60b3f..1054aba 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -439,6 +439,8 @@
 				    l1p->u.phDataReq.msgUnitParam.u8Size);
 	} else {
 		/* empty frame */
+		if (trx->bts->dtxd && trx != trx->bts->c0)
+			lchan->tch.dtxd_active = true;
 		empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr);
 	}
 	/* send message to DSP's queue */
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index debc80a..d6d0cdd 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -433,6 +433,8 @@
 				    l1p->u.phDataReq.msgUnitParam.u8Size);
 	} else {
 		/* empty frame */
+		if (trx->bts->dtxd && trx != trx->bts->c0)
+			lchan->tch.dtxd_active = true;
 		empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr);
 	}
 	/* send message to DSP's queue */

-- 
To view, visit https://gerrit.osmocom.org/220
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I148a75725c4e5089b6f2da6e9adcbe94170d3257
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list