[PATCH] 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/osmocom-net-gprs@lists.osmocom.org/.

Bhargava Abhyankar Bhargava.Abhyankar at radisys.com
Fri Apr 1 13:58:25 UTC 2016


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 increaded.
---
 include/osmo-bts/pcu_if.h      | 3 ++-
 include/osmo-bts/pcuif_proto.h | 6 ++++--
 src/common/l1sap.c             | 3 ++-
 src/common/pcu_sock.c          | 5 ++++-
 src/osmo-bts-sysmo/l1_if.c     | 6 ++++++
 5 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index 0c4fb69..0c0f0b2 100644
--- a/include/osmo-bts/pcu_if.h
+++ b/include/osmo-bts/pcu_if.h
@@ -11,7 +11,8 @@ int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
 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);
 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..b965d7c 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_rts_req {
 
 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;
+	enum ph_burst_type burst;
 } __attribute__ ((packed));
 
 struct gsm_pcu_if_info_trx {
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index ac398d3..2b2e8f4 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -903,7 +903,8 @@ static int l1sap_ph_rach_ind(struct gsm_bts_trx *trx,
 	if (trx == bts->c0 && L1SAP_IS_PACKET_RACH(rach_ind->ra)) {
 		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);
 		return 0;
 	}
 
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 7c835fb..d7825f0 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -343,7 +343,8 @@ int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
 	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)
 {
 	struct msgb *msg;
 	struct gsm_pcu_if *pcu_prim;
@@ -362,6 +363,8 @@ int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint8_t ra, uint32_t fn)
 	rach_ind->ra = ra;
 	rach_ind->qta = qta;
 	rach_ind->fn = fn;
+	rach_ind->is_11bit = is_11bit;
+	rach_ind->burst = burst;
 
 	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 debc80a..a8f957c 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -898,6 +898,12 @@ static int handle_ph_ra_ind(struct femtol1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind,
 	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
+	 * is supported */
+	l1sap->u.rach_ind.is_11bit = 0;
+	l1sap->u.rach_ind.burst = 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;
-- 
2.5.0





More information about the osmocom-net-gprs mailing list