Change in osmo-bsc[master]: handover_decision_2.c: add current_rxqual()

laforge gerrit-no-reply at lists.osmocom.org
Wed Jun 30 08:03:25 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24806 )

Change subject: handover_decision_2.c: add current_rxqual()
......................................................................

handover_decision_2.c: add current_rxqual()

Pre-empt code dup: this will be also used by an upcoming patch, so first
put it in a function.

Change-Id: I0d5bdaa9605f2bd4241cdd47ccf1ce1c697818a8
---
M src/osmo-bsc/handover_decision_2.c
1 file changed, 10 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c
index c9d1198..7a14f06 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -250,6 +250,15 @@
 				ho_get_hodec2_rxlev_avg_win(bts->ho));
 }
 
+static int current_rxqual(struct gsm_lchan *lchan)
+{
+	struct gsm_bts *bts = lchan->ts->trx->bts;
+	return get_meas_rep_avg(lchan,
+				ho_get_hodec2_full_tdma(bts->ho) ?
+					MEAS_REP_DL_RXQUAL_FULL : MEAS_REP_DL_RXQUAL_SUB,
+				ho_get_hodec2_rxqual_avg_win(bts->ho));
+}
+
 static bool is_low_rxlev(int rxlev_current, struct handover_cfg *neigh_cfg)
 {
 	return rxlev_current >= 0
@@ -1464,10 +1473,7 @@
 
 	/* get average levels. if not enough measurements yet, value is < 0 */
 	av_rxlev = current_rxlev(lchan);
-	av_rxqual = get_meas_rep_avg(lchan,
-				     ho_get_hodec2_full_tdma(bts->ho) ?
-				     MEAS_REP_DL_RXQUAL_FULL : MEAS_REP_DL_RXQUAL_SUB,
-				     ho_get_hodec2_rxqual_avg_win(bts->ho));
+	av_rxqual = current_rxqual(lchan);
 	if (av_rxlev < 0 && av_rxqual < 0) {
 		LOGPHOLCHAN(lchan, LOGL_INFO, "Skipping, Not enough recent measurements\n");
 		return;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24806
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I0d5bdaa9605f2bd4241cdd47ccf1ce1c697818a8
Gerrit-Change-Number: 24806
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210630/5d01e601/attachment.htm>


More information about the gerrit-log mailing list