aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2017-08-23 17:39:36 +0300
committerIvan Kluchnikov <kluchnikovi@gmail.com>2017-08-23 17:39:36 +0300
commit688915abc7d64bf8e0ce25db96ccf14f98e917f9 (patch)
tree0ea551cbd9a459ee9063df94f368df6381600908
parent4cd60620fc46a386637ec24c502224e4221b3dd8 (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;