summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2017-08-23 17:51:22 +0300
committerIvan Kluchnikov <kluchnikovi@gmail.com>2017-08-23 17:51:22 +0300
commitee594b10352dee30458d48fdc6d661a9b9576f76 (patch)
treeba50646c81d6cc85b7c6b617ed0031d1a14c1337
parent688915abc7d64bf8e0ce25db96ccf14f98e917f9 (diff)
handover_decision: Add more log messages to get more information about HO causes in logs
-rw-r--r--openbsc/src/libbsc/handover_decision.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/openbsc/src/libbsc/handover_decision.c b/openbsc/src/libbsc/handover_decision.c
index f81f1dd..eefa009 100644
--- a/openbsc/src/libbsc/handover_decision.c
+++ b/openbsc/src/libbsc/handover_decision.c
@@ -209,7 +209,7 @@ static int attempt_handover(struct gsm_meas_rep *mr)
rc = handover_to_arfcn_bsic(mr->lchan, best_cell->arfcn, best_cell->bsic);
switch (rc) {
case 0:
- LOGPC(DHO, LOGL_INFO, "Starting handover\n");
+ LOGPC(DHO, LOGL_INFO, "Starting handover: meas report number %d \n", mr->nr);
break;
case -ENOSPC:
LOGPC(DHO, LOGL_INFO, "No channel available\n");
@@ -257,20 +257,32 @@ static int process_meas_rep(struct gsm_meas_rep *mr)
/* Interference HO */
if (rxlev2dbm(av_rxlev) > -85 &&
- meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5))
+ meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5)) {
+ LOGPC(DHO, LOGL_INFO, "HO cause: Interference HO av_rxlev=%d dbm \n",
+ rxlev2dbm(av_rxlev));
return attempt_handover(mr);
+ }
/* Bad Quality */
- if (meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5))
+ if (meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5)) {
+ LOGPC(DHO, LOGL_INFO, "HO cause: Bad Quality av_rxlev=%d dbm \n",
+ rxlev2dbm(av_rxlev));
return attempt_handover(mr);
+ }
/* Low Level */
- if (rxlev2dbm(av_rxlev) <= -110)
+ if (rxlev2dbm(av_rxlev) <= -110) {
+ LOGPC(DHO, LOGL_INFO, "HO cause: Low Level av_rxlev=%d dbm \n",
+ rxlev2dbm(av_rxlev));
return attempt_handover(mr);
+ }
/* Distance */
- if (mr->ms_l1.ta > net->handover.max_distance)
+ if (mr->ms_l1.ta > net->handover.max_distance) {
+ LOGPC(DHO, LOGL_INFO, "HO cause: Distance av_rxlev=%d dbm ta=%d \n",
+ rxlev2dbm(av_rxlev), mr->ms_l1.ta);
return attempt_handover(mr);
+ }
/* Power Budget AKA Better Cell */
if ((mr->nr % net->handover.pwr_interval) == net->handover.pwr_interval - 1)