aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbhargava <Bhargava.Abhyankar@radisys.com>2016-08-17 16:27:31 +0530
committerHarald Welte <laforge@gnumonks.org>2016-08-27 01:20:46 +0000
commite77bcaecb6e45b55b8e31fea7cf10c2652431c1c (patch)
tree45b73d5d28419b63808a378f670b006dfdcf5495
parent43d082e6f1ec42aae566cc21cecc90e56a262090 (diff)
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
-rw-r--r--include/osmo-bts/pcu_if.h3
-rw-r--r--include/osmo-bts/pcuif_proto.h6
-rw-r--r--src/common/l1sap.c9
-rw-r--r--src/common/pcu_sock.c5
-rw-r--r--src/osmo-bts-sysmo/l1_if.c6
5 files changed, 22 insertions, 7 deletions
diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h
index efad0c5..a020c05 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, uint16_t ber10k, int16_t bto, int16_t lqual);
-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 07d35f8..5527238 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 0x06
+#define PCU_IF_VERSION 0x07
/* msg_type */
#define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */
@@ -67,10 +67,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;
+ 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 6498103..2ab4055 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -288,7 +288,7 @@ static int gsmtap_ph_rach(struct osmo_phsap_prim *l1sap, uint8_t *chan_type,
*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;
@@ -965,10 +965,13 @@ static int l1sap_ph_rach_ind(struct gsm_bts_trx *trx,
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 fed464f..62f18a7 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -371,7 +371,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_type)
{
struct msgb *msg;
struct gsm_pcu_if *pcu_prim;
@@ -390,6 +391,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_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 f70ccf5..fcd3a3e 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -970,6 +970,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 */
+
+ 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;