Change in osmo-bts[master]: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields

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
Sat Nov 16 19:01:30 UTC 2019


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


Change subject: pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields
......................................................................

pcuif_proto.h: extend RACH.ind with TRX and timeslot number fields

Since there can be multiple PDCH channels configured on different
timeslots, different TRXes, and BTSes, the PTCCH/U handling code
in OsmoPCU needs to know the exact origin of a given RACH.ind.

Otherwise, it is not known which subscriber originated a given
PTCCH/U indication, and hence it is impossible to send PTCCH/D
Timing Advance notification properly.

Fortunately, we can extend the RACH.ind message without even
bumping the protocol version, because every single PDU has a
fixed size defined by the largest message - INFO.ind. In case
if the actual message payload is smaller, the rest is filled
with a constant padding byte (0x00).

Older versions of OsmoPCU will consider the new fields as padding,
while the messages from older OsmoBTS versions will always have
both fields set to 0x00. Since C0/TS0 cannot be configured to
PDCH, this can be easily detected on the other end.

Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6
Related: OS#4102, OS#1545
---
M include/osmo-bts/pcu_if.h
M include/osmo-bts/pcuif_proto.h
M src/common/l1sap.c
M src/common/pcu_sock.c
4 files changed, 15 insertions(+), 7 deletions(-)



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

diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index f34e0cd..1475a94 100644
--- a/include/osmo-bts/pcu_if.h
+++ b/include/osmo-bts/pcu_if.h
@@ -11,8 +11,9 @@
 int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
 	uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len,
 		    int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual);
-int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
-	uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi);
+int pcu_tx_rach_ind(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
+		    int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit,
+		    enum ph_burst_type burst_type, uint8_t sapi);
 int pcu_tx_time_ind(uint32_t fn);
 int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed);
 int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len);
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index 2d24c43..e977914 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -108,6 +108,8 @@
 	uint16_t	arfcn;
 	uint8_t		is_11bit;
 	uint8_t		burst_type;
+	uint8_t		trx_nr;
+	uint8_t		ts_nr;
 } __attribute__ ((packed));
 
 struct gsm_pcu_if_info_trx {
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 7bf0b09..e640ce9 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1403,7 +1403,8 @@
 		       rach_ind->acc_delay_256bits);
 
 		/* QTA: Timing Advance in units of 1/4 of a symbol */
-		pcu_tx_rach_ind(trx->bts, rach_ind->acc_delay_256bits >> 6,
+		pcu_tx_rach_ind(trx->bts->nr, trx->nr, rach_ind->chan_nr & 0x07,
+				rach_ind->acc_delay_256bits >> 6,
 				rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
 				rach_ind->burst_type, PCU_IF_SAPI_PTCCH);
 		return 0;
@@ -1466,7 +1467,8 @@
 			rach_ind->acc_delay, rach_ind->ra);
 
 		/* QTA: Timing Advance in units of 1/4 of a symbol */
-		pcu_tx_rach_ind(bts, rach_ind->acc_delay_256bits >> 6,
+		pcu_tx_rach_ind(bts->nr, trx->nr, rach_ind->chan_nr & 0x07,
+			rach_ind->acc_delay_256bits >> 6,
 			rach_ind->ra, rach_ind->fn, rach_ind->is_11bit,
 			rach_ind->burst_type, PCU_IF_SAPI_RACH);
 		return 0;
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 9fc1d4d..579f8cc 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -379,8 +379,9 @@
 	return pcu_sock_send(&bts_gsmnet, msg);
 }
 
-int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
-	uint8_t is_11bit, enum ph_burst_type burst_type, uint8_t sapi)
+int pcu_tx_rach_ind(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
+		    int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit,
+		    enum ph_burst_type burst_type, uint8_t sapi)
 {
 	struct msgb *msg;
 	struct gsm_pcu_if *pcu_prim;
@@ -389,7 +390,7 @@
 	LOGP(DPCU, LOGL_INFO, "Sending RACH indication: qta=%d, ra=%d, "
 		"fn=%d\n", qta, ra, fn);
 
-	msg = pcu_msgb_alloc(PCU_IF_MSG_RACH_IND, bts->nr);
+	msg = pcu_msgb_alloc(PCU_IF_MSG_RACH_IND, bts_nr);
 	if (!msg)
 		return -ENOMEM;
 	pcu_prim = (struct gsm_pcu_if *) msg->data;
@@ -401,6 +402,8 @@
 	rach_ind->fn = fn;
 	rach_ind->is_11bit = is_11bit;
 	rach_ind->burst_type = burst_type;
+	rach_ind->trx_nr = trx_nr;
+	rach_ind->ts_nr = ts_nr;
 
 	return pcu_sock_send(&bts_gsmnet, msg);
 }

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iff38934a108b6b1cd298669834263a7d5296c3f6
Gerrit-Change-Number: 16080
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191116/57b5d394/attachment.htm>


More information about the gerrit-log mailing list