Update parameters in osmo-bts for 11 bit RACH

Submitted by Bhargava Abhyankar on April 5, 2016, 11:57 a.m.

Details

Message ID 1459857461-24941-1-git-send-email-Bhargava.Abhyankar@radisys.com
State New
Series "Update parameters in osmo-bts for 11 bit RACH"
Headers show

Commit Message

Bhargava Abhyankar April 5, 2016, 11:57 a.m.
Based on the indication from L1, number of bits in RACH and burst
type is determined. Appropriate parameters are filled in osmo-bts.
These parameters are sent to osmo-pcu for processing of the RACH.
---
 src/osmo-bts-sysmo/l1_if.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index a8f957c..1aec989 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -857,7 +857,7 @@  static int handle_ph_ra_ind(struct femtol1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind,
 	struct gsm_lchan *lchan;
 	struct osmo_phsap_prim *l1sap;
 	uint32_t fn;
-	uint8_t ra, acc_delay = 0;
+	uint16_t ra, acc_delay = 0, is_11bit = 0, burst_type = 0;
 	int rc;
 
 	/* increment number of busy RACH slots, if required */
@@ -879,16 +879,25 @@  static int handle_ph_ra_ind(struct femtol1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind,
 		btsb->load.rach.access++;
 
 	dump_meas_res(LOGL_DEBUG, &ra_ind->measParam);
+	burst_type = ra_ind->burstType;
 
-	if (ra_ind->msgUnitParam.u8Size != 1) {
+	if ((ra_ind->msgUnitParam.u8Size != 1) &&
+		(ra_ind->msgUnitParam.u8Size != 2)) {
 		LOGP(DL1C, LOGL_ERROR, "PH-RACH-INDICATION has %d bits\n",
 			ra_ind->sapi);
 		msgb_free(l1p_msg);
 		return 0;
 	}
 
+	if (ra_ind->msgUnitParam.u8Size == 2) {
+		is_11bit = 1;
+		memcpy(&ra, ra_ind->msgUnitParam.u8Buffer, 2);
+	} else {
+		is_11bit = 0;
+		ra = ra_ind->msgUnitParam.u8Buffer[0];
+	}
+
 	fn = ra_ind->u32Fn;
-	ra = ra_ind->msgUnitParam.u8Buffer[0];
 	rc = msgb_trim(l1p_msg, sizeof(*l1sap));
 	if (rc < 0)
 		MSGB_ABORT(l1p_msg, "No room for primitive data\n");
@@ -898,11 +907,8 @@  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;
+	l1sap->u.rach_ind.is_11bit = is_11bit;	/* no of bits in 11 bit RACH */
+	l1sap->u.rach_ind.burst = burst_type;	/* type of burst */
 
 	if (!lchan || lchan->ts->pchan == GSM_PCHAN_CCCH ||
 	    lchan->ts->pchan == GSM_PCHAN_CCCH_SDCCH4)
@@ -911,6 +917,7 @@  static int handle_ph_ra_ind(struct femtol1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind,
 		l1sap->u.rach_ind.chan_nr = gsm_lchan2chan_nr(lchan);
 
 	return l1sap_up(trx, l1sap);
+
 }
 
 /* handle any random indication from the L1 */

Comments

Holger Freyther April 7, 2016, 7:48 a.m.
> On 05 Apr 2016, at 13:57, Bhargava Abhyankar <Bhargava.Abhyankar@radisys.com> wrote:

Dear Bhargava,

> Based on the indication from L1, number of bits in RACH and burst
> type is determined. Appropriate parameters are filled in osmo-bts.
> These parameters are sent to osmo-pcu for processing of the RACH.

how did you test this? Do you have a patch for OpenBSC to modify the SIs to allow 11bit RACH bursts?

kind regards
	holger
Bhargava Abhyankar April 12, 2016, 2:06 p.m.
> On 07 Apr 2016, at 01:18 PM, Holger Freyther <holger@freyther.de> wrote:

Dear Holger,

> Based on the indication from L1, number of bits in RACH and burst type 
> is determined. Appropriate parameters are filled in osmo-bts.
> These parameters are sent to osmo-pcu for processing of the RACH.

>> how did you test this? Do you have a patch for OpenBSC to modify the SIs to allow 11 bit RACH bursts?

A patch shall be sent to  modify the SIs to allow 11 bit RACH bursts in OpenBSC. This patch is implemented based on the inputs from the L1 team. This code is not tested in integration test setup.

kind regards
Bhargava Abhyankar