Review at  https://gerrit.osmocom.org/7086

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
---
M src/common/l1sap.c
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/86/7086/1

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index f83c46d..a96e793 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1211,11 +1211,6 @@
                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 @@
                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);
 

-- 
To view, visit https://gerrit.osmocom.org/7086
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31594a8c5dce1f42226ced5b2dc8778152b3d829
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com>

Reply via email to