aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2017-08-23 17:39:36 +0300
committerIvan Kluchnikov <kluchnikovi@gmail.com>2017-09-04 17:20:02 +0300
commitb0a6d1b92daffa37761bbb342d465c46825ad68a (patch)
tree03cfe142ef41572200aad587196c735472d71b8a
parent5932ff04a1c7c3c831dae366d394d7ef0f8d1ffd (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;