Change in osmo-bts[master]: l1sap: Fix calculation of expired RACH slots in case of missing frame...

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri May 24 08:38:13 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14160


Change subject: l1sap: Fix calculation of expired RACH slots in case of missing frame numbers
......................................................................

l1sap: Fix calculation of expired RACH slots in case of missing frame numbers

In case of a Combined CCCH (with SDCCH/4), the number of RACH slots
depends on the frame number.  So in case of lost/skipped frame numbers,
we cannot simply compute the value for the current fn and then multiply
it by the number of frame numbers expired.  Rather, we have to 'replay'
all missed frame numbers and individually determine how many RACH
slots happened in that frame.

Related: OS#3750
Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe
---
M src/common/l1sap.c
1 file changed, 5 insertions(+), 2 deletions(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index d9ffdb8..52f2b33 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -493,6 +493,7 @@
 			       struct info_time_ind_param *info_time_ind)
 {
 	int frames_expired;
+	int i;
 
 	DEBUGPFN(DL1P, info_time_ind->fn, "Rx MPH_INFO time ind\n");
 
@@ -513,8 +514,10 @@
 
 	/* increment number of RACH slots that have passed by since the
 	 * last time indication */
-	bts->load.rach.total +=
-	    calc_exprd_rach_frames(bts, info_time_ind->fn) * frames_expired;
+	for (i = 0; i < frames_expired; i++) {
+		uint32_t fn = (info_time_ind->fn + GSM_HYPERFRAME - i) % GSM_HYPERFRAME;
+		bts->load.rach.total += calc_exprd_rach_frames(bts, fn);
+	}
 
 	return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/14160
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe
Gerrit-Change-Number: 14160
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190524/25b00f98/attachment.html>


More information about the gerrit-log mailing list