[PATCH] osmo-bts[master]: Change interface in osmo-bts for 11 bit RACH

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

bhargava_abhyankar gerrit-no-reply at lists.osmocom.org
Tue Jul 26 11:51:51 UTC 2016


Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/433

to look at the new patch set (#4).

Change interface in osmo-bts for 11 bit RACH

Interface structure between osmo-bts and osmo-pcu is updated with the
parameters to differentiate the type of RACH and further support 11 bit
RACH. The function prototype and definitions are changed accordingly.
Interface version number is increased.

Change-Id: I4f4c501b2d86d77c78de32a84b1804172ffb6f4d
---
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
M src/osmo-bts-sysmo/l1_if.c
5 files changed, 22 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/33/433/4

diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index 3ce4d0b..c54166f 100644
--- a/include/osmo-bts/pcu_if.h
+++ b/include/osmo-bts/pcu_if.h
@@ -11,7 +11,8 @@
 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);
-int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint8_t ra, uint32_t fn);
+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);
 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 9d740ac..6e6a9a3 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -1,7 +1,7 @@
 #ifndef _PCUIF_PROTO_H
 #define _PCUIF_PROTO_H
 
-#define PCU_IF_VERSION		0x05
+#define PCU_IF_VERSION		0x06
 
 /* msg_type */
 #define PCU_IF_MSG_DATA_REQ	0x00	/* send data to given channel */
@@ -64,10 +64,12 @@
 
 struct gsm_pcu_if_rach_ind {
 	uint8_t		sapi;
-	uint8_t		ra;
+	uint16_t	ra;
 	int16_t		qta;
 	uint32_t	fn;
 	uint16_t	arfcn;
+	uint8_t		is_11bit;
+	uint8_t 	burst_type;
 } __attribute__ ((packed));
 
 struct gsm_pcu_if_info_trx {
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 0bbdb9e..fe01bae 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -288,7 +288,7 @@
 		*ss = L1SAP_CHAN2SS_SDCCH4(chan_nr);
 	else if (L1SAP_IS_CHAN_SDCCH8(chan_nr))
 		*ss = L1SAP_CHAN2SS_SDCCH8(chan_nr);
-	*data = &l1sap->u.rach_ind.ra;
+	*data = (uint8_t *)&l1sap->u.rach_ind.ra;
 	*len = 1;
 
 	return 0;
@@ -951,10 +951,13 @@
 		return l1sap_handover_rach(trx, l1sap, rach_ind);
 
 	/* check for packet access */
-	if (trx == bts->c0 && L1SAP_IS_PACKET_RACH(rach_ind->ra)) {
+	if ((trx == bts->c0 && L1SAP_IS_PACKET_RACH(rach_ind->ra)) ||
+		(trx == bts->c0 && rach_ind->is_11bit)) {
+
 		LOGP(DL1P, LOGL_INFO, "RACH for packet access\n");
 		pcu_tx_rach_ind(bts, rach_ind->acc_delay << 2,
-			rach_ind->ra, rach_ind->fn);
+			rach_ind->ra, rach_ind->fn,
+			rach_ind->is_11bit, rach_ind->burst_type);
 		return 0;
 	}
 
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index d40b19b..26ba995 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -369,7 +369,8 @@
 	return pcu_sock_send(&bts_gsmnet, msg);
 }
 
-int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint8_t ra, uint32_t fn)
+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)
 {
 	struct msgb *msg;
 	struct gsm_pcu_if *pcu_prim;
@@ -388,6 +389,8 @@
 	rach_ind->ra = ra;
 	rach_ind->qta = qta;
 	rach_ind->fn = fn;
+	rach_ind->is_11bit = is_11bit;
+	rach_ind->burst_type = burst_type;
 
 	return pcu_sock_send(&bts_gsmnet, msg);
 }
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 2dcd87e..dbe7173 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -965,6 +965,12 @@
 	l1sap->u.rach_ind.ra = ra;
 	l1sap->u.rach_ind.acc_delay = acc_delay;
 	l1sap->u.rach_ind.fn = fn;
+
+	/* Initialising the parameters needs to be handled when 11 bit RACH */
+
+	l1sap->u.rach_ind.is_11bit = 0;
+	l1sap->u.rach_ind.burst_type = GSM_L1_BURST_TYPE_ACCESS_0;
+
 	if (!lchan || lchan->ts->pchan == GSM_PCHAN_CCCH ||
 	    lchan->ts->pchan == GSM_PCHAN_CCCH_SDCCH4)
 		l1sap->u.rach_ind.chan_nr = 0x88;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4f4c501b2d86d77c78de32a84b1804172ffb6f4d
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: bhargava_abhyankar <Bhargava.Abhyankar at radisys.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: bhargava_abhyankar <Bhargava.Abhyankar at radisys.com>



More information about the gerrit-log mailing list