aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-03-05 20:03:06 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-03-05 20:03:06 +0700
commit53bdf4d949433a5d69ff2bdd2f74746e93195b88 (patch)
tree945a51bb3c9a90ddf09740a10f876274a5698abb /src
parent10aa1cd6f6e9a10741965991ecba2b0939e50542 (diff)
common/l1sap.c: increment valid RACH counter after all checks
Previously, the number of RACH slots with valid non-handover RACH burst was incremented between both BER (Bit Error Rate) and ToA (Timing of Arrival) checks. So, if a RACH burst passed the BER check, but was dropped by ToA check, the counter of valid RACH requests could be increased anyway. Change-Id: I31594a8c5dce1f42226ced5b2dc8778152b3d829
Diffstat (limited to 'src')
-rw-r--r--src/common/l1sap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index f83c46de..a96e7939 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1211,11 +1211,6 @@ static int l1sap_ph_rach_ind(struct gsm_bts_trx *trx,
return 0;
}
- /* increment number of RACH slots with valid non-handover RACH burst */
- btsb->load.rach.access++;
-
- lc = &trx->ts[0].lchan[CCCH_LCHAN].lapdm_ch;
-
/* check for under/overflow / sign */
if (!check_acc_delay(rach_ind, btsb, &acc_delay)) {
LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "ignoring RACH request %u > max_ta(%u)\n",
@@ -1224,6 +1219,11 @@ static int l1sap_ph_rach_ind(struct gsm_bts_trx *trx,
return 0;
}
+ /* increment number of RACH slots with valid non-handover RACH burst */
+ btsb->load.rach.access++;
+
+ lc = &trx->ts[0].lchan[CCCH_LCHAN].lapdm_ch;
+
/* According to 3GPP TS 48.058 ยง 9.3.17 Access Delay is expressed same way as TA (number of symbols) */
set_ms_to_data(get_lchan_by_chan_nr(trx, rach_ind->chan_nr), acc_delay, false);