Change in osmo-bts[master]: [VAMOS] osmo-bts-trx: indicate MTS in Downlink TRXDv2 PDUs

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

fixeria gerrit-no-reply at lists.osmocom.org
Fri May 21 15:15:47 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/24325 )


Change subject: [VAMOS] osmo-bts-trx: indicate MTS in Downlink TRXDv2 PDUs
......................................................................

[VAMOS] osmo-bts-trx: indicate MTS in Downlink TRXDv2 PDUs

Change-Id: I1a17a25883214c068f9b1a6d651128b8f760d1fb
Related: SYS#4895, OS#4941
---
M include/osmo-bts/scheduler.h
M src/common/scheduler.c
M src/osmo-bts-trx/scheduler_trx.c
M src/osmo-bts-trx/trx_if.c
4 files changed, 20 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/25/24325/1

diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index cf980bc..beb2716 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -264,10 +264,13 @@
 	uint32_t fn;		/*!< TDMA frame number */
 	uint8_t tn;		/*!< TDMA timeslot number */
 	uint8_t att;		/*!< Tx power attenuation */
-	uint8_t mts;		/*!< MTS (Modulation and Training Sequence) */
 	int8_t scpir;		/*!< SCPIR (for AQPSK only) */
 	uint8_t trx_num;	/*!< TRX (RF channel) number */
 
+	enum trx_mod_type mod;	/*!< Modulation type */
+	uint8_t tsc_set;	/*!< Training Sequence Set */
+	uint8_t tsc;		/*!< Training Sequence Code */
+
 	/* Internally used by the scheduler */
 	enum trx_chan_type chan;
 	uint8_t bid;
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index f5a5b89..7d9e98b 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -1219,6 +1219,9 @@
 	if (func(l1ts, br) != 0)
 		return;
 
+	/* Modulation may be changed by func() */
+	br->mod = l1cs->dl_mod_type;
+
 	/* BS Power reduction (in dB) per logical channel */
 	if (l1cs->lchan != NULL)
 		br->att = l1cs->lchan->bs_power_ctrl.current;
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index fa5c719..824779f 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -107,11 +107,16 @@
 
 		for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
 			struct trx_dl_burst_req *br = &pinst->u.osmotrx.br[tn];
+			const struct gsm_bts_trx_ts *ts = &trx->ts[tn];
 
 			*br = (struct trx_dl_burst_req) {
 				.trx_num = trx->nr,
 				.fn = sched_fn,
 				.tn = tn,
+
+				/* Modulation and Training Sequence */
+				.mod = TRX_MOD_T_GMSK,
+				.tsc = gsm_ts_tsc(ts),
 			};
 		}
 	}
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 13799d9..b08f187 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -740,6 +740,11 @@
 	TRX_UL_V2HDR_LEN, /* TRXDv2 */
 };
 
+static const uint8_t trx_data_mod_val[] = {
+	[TRX_MOD_T_GMSK]	= 0x00, /* .00xx... */
+	[TRX_MOD_T_8PSK]	= 0x20, /* .010x... */
+};
+
 /* Header dissector for TRXDv0 (and part of TRXDv1) */
 static inline void trx_data_handle_hdr_v0_part(struct trx_ul_burst_ind *bi,
 					       const uint8_t *buf)
@@ -1105,7 +1110,9 @@
 		buf[0] = br->tn;
 		/* BATCH.ind will be unset in the last PDU */
 		buf[1] = (br->trx_num & 0x3f) | (1 << 7);
-		buf[2] = br->mts;
+		buf[2] = trx_data_mod_val[br->mod]
+		       | (br->tsc_set << 3)
+		       | (br->tsc & 0x07);
 		buf[3] = br->att;
 		buf[4] = (uint8_t) br->scpir;
 		buf[5] = buf[6] = buf[7] = 0x00; /* Spare */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I1a17a25883214c068f9b1a6d651128b8f760d1fb
Gerrit-Change-Number: 24325
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210521/b542bbd2/attachment.htm>


More information about the gerrit-log mailing list