summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-05-17 15:56:49 +0200
committerHolger Freyther <holger@freyther.de>2016-05-20 16:26:33 +0000
commit8a4d2e756d80dd35cb9a3cf1bc3c2d2dc469fccb (patch)
tree06ee15e9333b5fde919b6ed80779867e46bdad90 /openbsc/src
parentc08ee71bff4d86120b051b70e77833458e68aa0b (diff)
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 Reviewed-on: https://gerrit.osmocom.org/66 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libbsc/handover_decision.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/openbsc/src/libbsc/handover_decision.c b/openbsc/src/libbsc/handover_decision.c
index 24c0f79cb..0f07bcac6 100644
--- a/openbsc/src/libbsc/handover_decision.c
+++ b/openbsc/src/libbsc/handover_decision.c
@@ -228,6 +228,7 @@ static int attempt_handover(struct gsm_meas_rep *mr)
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 @@ static int process_meas_rep(struct gsm_meas_rep *mr)
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 */