aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2017-08-23 17:39:36 +0300
committerNeels Hofmeyr <neels@hofmeyr.de>2018-01-12 00:43:32 +0100
commit780a3588f2d2d5f36fc31d55d0e6041a3c87282b (patch)
treedf3e38824bd06ff4a17917c958d03bbd99b3bb85
parentc0ce328728bfddfb72da7dca985e0557f75c3791 (diff)
handover_decision: Fix condition for power budget handover attempt
Handover attempt for power budget case should be performed every N SACCH frames, where N = Power Budget Interval. First measurement report with mr->nr = 0 was used for the first handover attempt in this case, which is not correct, because first usable report should have mr->nr = net->handover.pwr_interval-1. Moreover using the first measurement report with mr->nr = 0 for handover attempt could lead to unnecessary handover, because usually av_rxlev for first measurement report from MS is worse than for following reports. Change-Id: If7f54a4cb179eaa9e5eb147b9477633ac618e69e
-rw-r--r--openbsc/src/libbsc/handover_decision.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/handover_decision.c b/openbsc/src/libbsc/handover_decision.c
index 0f07bcac6..f81f1ddee 100644
--- a/openbsc/src/libbsc/handover_decision.c
+++ b/openbsc/src/libbsc/handover_decision.c
@@ -273,7 +273,7 @@ static int process_meas_rep(struct gsm_meas_rep *mr)
return attempt_handover(mr);
/* Power Budget AKA Better Cell */
- if ((mr->nr % net->handover.pwr_interval) == 0)
+ if ((mr->nr % net->handover.pwr_interval) == net->handover.pwr_interval - 1)
return attempt_handover(mr);
return 0;