diff mbox

Change in openbsc[master]: Use proper measurement for handover

Message ID gerrit.1463493996339.I95e8e544047a83a256e057a47458678f40a19a15@gerrit.osmocom.org
State New
Headers show

Commit Message

gerrit-no-reply@lists.osmocom.org May 17, 2016, 2:06 p.m. UTC
From Max <msuraev@sysmocom.de>:

Max has uploaded a new change for review.

  https://gerrit.osmocom.org/66

Change subject: Use proper measurement for handover
......................................................................

Use proper measurement for handover

Previously *FULL measurements were always used for handover
decisions. Those are incorrect in case of DTX - check if it was enabled
and use *SUB instead.

Note: *SUB values have higher variance so there might be more "bad"
values compared to *FULL although real quality remains the same.

Change-Id: I95e8e544047a83a256e057a47458678f40a19a15
Related: OS#1701
---
M openbsc/src/libbsc/handover_decision.c
1 file changed, 12 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/66/66/1

Comments

gerrit-no-reply@lists.osmocom.org May 17, 2016, 4:22 p.m. UTC | #1
From Harald Welte <laforge@gnumonks.org>:

Harald Welte has posted comments on this change.

Change subject: Use proper measurement for handover
......................................................................


Patch Set 1: Code-Review+1

looks fine to me. Did you test/confirm hand-over operation after this change with both no-DTX and DTX enabled?
gerrit-no-reply@lists.osmocom.org May 17, 2016, 4:23 p.m. UTC | #2
From Max <msuraev@sysmocom.de>:

Max has posted comments on this change.

Change subject: Use proper measurement for handover
......................................................................


Patch Set 1:

Not yet - the osmo-bts changes are not ready for test yet.
gerrit-no-reply@lists.osmocom.org May 20, 2016, 8:42 a.m. UTC | #3
Patch Set 1:

Note: this is about downlink measurements so until downlink DTX is implemented HO works as before (I've tested that).
gerrit-no-reply@lists.osmocom.org May 20, 2016, 3:45 p.m. UTC | #4
Patch Set 1: Code-Review+2
diff mbox

Patch

diff --git a/openbsc/src/libbsc/handover_decision.c b/openbsc/src/libbsc/handover_decision.c
index 24c0f79..0f07bca 100644
--- a/openbsc/src/libbsc/handover_decision.c
+++ b/openbsc/src/libbsc/handover_decision.c
@@ -228,6 +228,7 @@ 
 static int process_meas_rep(struct gsm_meas_rep *mr)
 {
 	struct gsm_network *net = mr->lchan->ts->trx->bts->network;
+	enum meas_rep_field dlev, dqual;
 	int av_rxlev;
 
 	/* we currently only do handover for TCH channels */
@@ -239,22 +240,28 @@ 
 		return 0;
 	}
 
+	if (mr->flags & MEAS_REP_F_DL_DTX) {
+		dlev = MEAS_REP_DL_RXLEV_SUB;
+		dqual = MEAS_REP_DL_RXQUAL_SUB;
+	} else {
+		dlev = MEAS_REP_DL_RXLEV_FULL;
+		dqual = MEAS_REP_DL_RXQUAL_FULL;
+	}
+
 	/* parse actual neighbor cell info */
 	if (mr->num_cell > 0 && mr->num_cell < 7)
 		process_meas_neigh(mr);
 
-	av_rxlev = get_meas_rep_avg(mr->lchan, MEAS_REP_DL_RXLEV_FULL,
+	av_rxlev = get_meas_rep_avg(mr->lchan, dlev,
 				    net->handover.win_rxlev_avg);
 
 	/* Interference HO */
 	if (rxlev2dbm(av_rxlev) > -85 &&
-	    meas_rep_n_out_of_m_be(mr->lchan, MEAS_REP_DL_RXQUAL_FULL,
-				   3, 4, 5))
+	    meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5))
 		return attempt_handover(mr);
 
 	/* Bad Quality */
-	if (meas_rep_n_out_of_m_be(mr->lchan, MEAS_REP_DL_RXQUAL_FULL,
-				   3, 4, 5))
+	if (meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5))
 		return attempt_handover(mr);
 
 	/* Low Level */