aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-12-07 01:55:58 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-01-12 03:28:14 +0100
commit880764cf72a90a87f341b4731c9e288f67719e40 (patch)
treec23ab3804990fa4208681cdd27498a889f51977e
parentaaa7cfd2dc45a8e9c9368f3ff4b1e4629f3f18ea (diff)
HO: add algorithm cfg; skip HO 1 if HO 2 is configured
-rw-r--r--include/osmocom/bsc/handover_cfg.h9
-rw-r--r--src/libbsc/handover_decision.c4
2 files changed, 13 insertions, 0 deletions
diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h
index 264cb1bc1..e281c3f72 100644
--- a/include/osmocom/bsc/handover_cfg.h
+++ b/include/osmocom/bsc/handover_cfg.h
@@ -60,6 +60,15 @@ static inline int bool2i(bool arg)
"Enable in-call handover\n" \
"Enable/disable handover: ") \
\
+ HO_CFG_ONE_MEMBER(int, algorithm, 1, \
+ "handover algorithm", "1|2", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ "Choose algorithm for handover decision\n" \
+ "Algorithm 1: trigger handover based on comparing current cell and neighbor RxLev and RxQual," \
+ " only.\n" \
+ "Algorithm 2: trigger handover on RxLev/RxQual, and also to balance the load across several" \
+ " cells. Consider available codecs. Prevent repeated handover by penalty timers.\n") \
+ \
HO_CFG_ONE_MEMBER(unsigned int, rxlev_avg_win, 10, \
"handover window rxlev averaging", "<1-10>", atoi, "%u", as_is, \
HO_CFG_STR_WIN_RXLEV \
diff --git a/src/libbsc/handover_decision.c b/src/libbsc/handover_decision.c
index b9fd0f7f1..6228a056f 100644
--- a/src/libbsc/handover_decision.c
+++ b/src/libbsc/handover_decision.c
@@ -264,6 +264,10 @@ static int process_meas_rep(struct gsm_meas_rep *mr)
enum meas_rep_field dlev, dqual;
int av_rxlev;
+ /* If this cell does not use handover algorithm 1, then we're not responsible. */
+ if (ho_get_algorithm(bts->ho) != 1)
+ return 0;
+
/* we currently only do handover for TCH channels */
switch (mr->lchan->type) {
case GSM_LCHAN_TCH_F: