diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-26 11:57:49 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-27 17:27:35 +0100 |
commit | c2b4c668f3510b7b0baace749c5a310959010e90 (patch) | |
tree | e4796019dc76a1655ab4a0f99e79b27636126e0b /src/osmo-bts-sysmo | |
parent | b60d9e9464dabba64e7ba73a1a8f41adab21ff31 (diff) |
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
Diffstat (limited to 'src/osmo-bts-sysmo')
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 396d1c2f..08f584b2 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -992,24 +992,16 @@ static int handle_ph_ra_ind(struct femtol1_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, 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; @@ -1043,6 +1035,9 @@ static int handle_ph_ra_ind(struct femtol1_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-sysmo*/ @@ -1065,6 +1060,7 @@ static int handle_ph_ra_ind(struct femtol1_hdl *fl1, GsmL1_PhRaInd_t *ra_ind, break; } + lchan = l1if_hLayer_to_lchan(trx, 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) |