From c2b4c668f3510b7b0baace749c5a310959010e90 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 26 Feb 2018 11:57:49 +0100 Subject: Move rach_busy counting above L1SAP In the past, rach_busy counting was performed below L1SAP, while reporting was handled above. This lead to subtle differences between the BTS models, such as osmo-bts-trx missing to increment rach_busy. Let's move the rach_busy counting above L1SAP to share more code. This means we need libosmocore Change-Id I9439810c3a3ad89ea0302753617b850749af887c for the additional required parameters in ph_rach_ind_param, as well as libosmocore Change-id I2b1926a37bde860dcfeb0d613eb55a71271928c5 for osmo-bts-trx to determine the RACH bit error rate. Change-Id: I3b989580cb38082e3fd8fc50a11fedda13991092 Closes: OS#3003 --- src/osmo-bts-litecell15/l1_if.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/osmo-bts-litecell15') diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 9c3b8672..1b83fbde 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -1002,24 +1002,16 @@ static int handle_ph_ra_ind(struct lc15l1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind, uint16_t ra = 0, is_11bit = 0, burst_type = 0, temp = 0; int rc; - /* increment number of busy RACH slots, if required */ - if (trx == bts->c0 && - ra_ind->measParam.fRssi >= btsb->load.rach.busy_thresh) - btsb->load.rach.busy++; - + /* FIXME: this should be deprecated/obsoleted as it bypasses rach.busy counting */ if (ra_ind->measParam.fLinkQuality < btsb->min_qual_rach) { msgb_free(l1p_msg); return 0; } + /* the old legacy full-bits acc_delay cannot express negative values */ if (ra_ind->measParam.i16BurstTiming > 0) acc_delay = ra_ind->measParam.i16BurstTiming >> 2; - /* increment number of RACH slots with valid non-handover RACH burst */ - lchan = l1if_hLayer_to_lchan(trx, (uint32_t)ra_ind->hLayer2); - if (trx == bts->c0 && !(lchan && lchan->ho.active == HANDOVER_ENABLED)) - btsb->load.rach.access++; - dump_meas_res(LOGL_DEBUG, &ra_ind->measParam); burst_type = ra_ind->burstType; @@ -1052,6 +1044,9 @@ static int handle_ph_ra_ind(struct lc15l1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind, l1sap->u.rach_ind.acc_delay = acc_delay; l1sap->u.rach_ind.fn = fn; l1sap->u.rach_ind.is_11bit = is_11bit; /* no of bits in 11 bit RACH */ + l1sap->u.rach_ind.rssi = (int8_t) ra_ind->measParam.fRssi; + l1sap->u.rach_ind.ber10k = (unsigned int) (ra_ind->measParam.fBer * 10000.0); + l1sap->u.rach_ind.acc_delay_256bits = ra_ind->measParam.i16BurstTiming * 64; /* mapping of the burst type, the values are specific to * osmo-bts-litecell15 */ @@ -1074,6 +1069,7 @@ static int handle_ph_ra_ind(struct lc15l1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind, break; } + lchan = l1if_hLayer_to_lchan(trx, (uint32_t)ra_ind->hLayer2); if (!lchan || lchan->ts->pchan == GSM_PCHAN_CCCH || lchan->ts->pchan == GSM_PCHAN_CCCH_SDCCH4 || lchan->ts->pchan == GSM_PCHAN_CCCH_SDCCH4_CBCH) -- cgit v1.2.3