Review at  https://gerrit.osmocom.org/5913

HO: add algorithm cfg; skip HO 1 if HO 2 is configured

Change-Id: If07c0a7b84937ab92948e9b71b2496a765946020
---
M include/osmocom/bsc/handover_cfg.h
M src/libbsc/handover_decision.c
2 files changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/13/5913/1

diff --git a/include/osmocom/bsc/handover_cfg.h 
b/include/osmocom/bsc/handover_cfg.h
index 264cb1b..e281c3f 100644
--- a/include/osmocom/bsc/handover_cfg.h
+++ b/include/osmocom/bsc/handover_cfg.h
@@ -60,6 +60,15 @@
                "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 158fc1c..1e2e0d9 100644
--- a/src/libbsc/handover_decision.c
+++ b/src/libbsc/handover_decision.c
@@ -265,6 +265,10 @@
        int av_rxlev;
        unsigned int pwr_interval;
 
+       /* 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:

-- 
To view, visit https://gerrit.osmocom.org/5913
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If07c0a7b84937ab92948e9b71b2496a765946020
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder

Reply via email to