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-16 15:28:57 +0100
commit864f553d909e200ef72dc41ab19af66d501098ff (patch)
treefab21baad16a47aa6f8ddf35581cb8e48abc41cb
parentd2474cad816b131e6508401a8bd784e01fc5b11c (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--src/libbsc/handover_decision.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libbsc/handover_decision.c b/src/libbsc/handover_decision.c
index 09c7eaa84..c637e2568 100644
--- a/src/libbsc/handover_decision.c
+++ b/src/libbsc/handover_decision.c
@@ -294,7 +294,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;