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

neels gerrit-no-reply at lists.osmocom.org
Tue Jun 29 20:24:28 UTC 2021


neels has uploaded this change for review. ( 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(-)



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

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210629/609f3df9/attachment.htm>


More information about the gerrit-log mailing list