Change in osmo-bts[master]: osmo-bts-trx/scheduler: fix measurement handling for SUB frames

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Oct 3 07:05:25 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18035 )

Change subject: osmo-bts-trx/scheduler: fix measurement handling for SUB frames
......................................................................

osmo-bts-trx/scheduler: fix measurement handling for SUB frames

Make sure that we pick the correct UL measurements from the
history when we deal with AMR SID frames (SUB frames).

Change-Id: I902bb47d68742d2589156f61099b67a0edbaf40b
Related: OS#2978
---
M include/osmo-bts/scheduler.h
M src/osmo-bts-trx/sched_lchan_tchf.c
M src/osmo-bts-trx/sched_lchan_tchh.c
M src/osmo-bts-trx/scheduler_trx.c
4 files changed, 43 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmo-bts/scheduler.h b/include/osmo-bts/scheduler.h
index b488b6c..f19a13e 100644
--- a/include/osmo-bts/scheduler.h
+++ b/include/osmo-bts/scheduler.h
@@ -276,6 +276,12 @@
 	SCHED_MEAS_AVG_M_OCTO,
 	/* last 6 bursts (default for FACCH/H) */
 	SCHED_MEAS_AVG_M_SIX,
+	/* first 4 of last 8 bursts */
+	SCHED_MEAS_AVG_M8_FIRST_QUAD,
+	/* first 2 of last 6 bursts */
+	SCHED_MEAS_AVG_M6_FIRST_TWO,
+	/* middle 2 of last 6 bursts */
+	SCHED_MEAS_AVG_M6_MIDDLE_TWO,
 };
 
 void trx_sched_meas_push(struct l1sched_chan_state *chan_state,
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index e29a47e..9c5bfc2 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -173,6 +173,17 @@
 			break;
 		}
 
+		switch (chan_state->amr_last_dtx) {
+		case AFS_SID_FIRST:
+		case AFS_SID_UPDATE_CN:
+			meas_avg_mode = SCHED_MEAS_AVG_M8_FIRST_QUAD;
+			break;
+		case AFS_SID_UPDATE:
+		case AFS_ONSET:
+			meas_avg_mode = SCHED_MEAS_AVG_M_QUAD;
+			break;
+		}
+
 		if (rc)
 			trx_loop_amr_input(l1t,
 				trx_chan_desc[chan].chan_nr | bi->tn, chan_state,
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 2a561e1..c400542 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -184,6 +184,20 @@
 			break;
 		}
 
+		switch (chan_state->amr_last_dtx) {
+		case AHS_SID_FIRST_P1:
+		case AHS_SID_FIRST_P2:
+		case AHS_SID_UPDATE:
+		case AHS_SID_UPDATE_CN:
+		case AHS_SID_FIRST_INH:
+		case AHS_SID_UPDATE_INH:
+			meas_avg_mode = SCHED_MEAS_AVG_M6_FIRST_TWO;
+			break;
+		case AHS_ONSET:
+			meas_avg_mode = SCHED_MEAS_AVG_M6_MIDDLE_TWO;
+			break;
+		}
+
 		if (rc)
 			trx_loop_amr_input(l1t,
 				trx_chan_desc[chan].chan_nr | bi->tn, chan_state,
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index 3921280..c000324 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -517,6 +517,18 @@
 	case SCHED_MEAS_AVG_M_SIX:
 		n = 6; shift = n;
 		break;
+	/* first 4 of last 8 bursts */
+	case SCHED_MEAS_AVG_M8_FIRST_QUAD:
+		n = 4; shift = 8;
+		break;
+	/* first 2 of last 6 bursts */
+	case SCHED_MEAS_AVG_M6_FIRST_TWO:
+		n = 2; shift = 6;
+		break;
+	/* middle 2 of last 6 bursts */
+	case SCHED_MEAS_AVG_M6_MIDDLE_TWO:
+		n = 2; shift = 4;
+		break;
 	default:
 		/* Shall not happen */
 		OSMO_ASSERT(false);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18035
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I902bb47d68742d2589156f61099b67a0edbaf40b
Gerrit-Change-Number: 18035
Gerrit-PatchSet: 11
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201003/bdbeaa02/attachment.htm>


More information about the gerrit-log mailing list