[MERGED] osmo-bts[master]: common/l1sap.c: perform noise / ghost filtering for handover...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Mar 5 17:29:51 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: common/l1sap.c: perform noise / ghost filtering for handover RACH
......................................................................


common/l1sap.c: perform noise / ghost filtering for handover RACH

For some reason, the noise / ghost filtering was performed for
normal RACH requests, but not for handover RACH requests. There
are also ghost RACH, interference and noise possible, so let's
extend the filtering coverage.

Change-Id: I94fc15835280d624780200dadc4418210bf565ff
---
M src/common/l1sap.c
1 file changed, 17 insertions(+), 14 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 9648caa..ce68599 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -797,20 +797,6 @@
 	return 1;
 }
 
-/* special case where handover RACH is detected */
-static int l1sap_handover_rach(struct gsm_bts_trx *trx,
-	struct osmo_phsap_prim *l1sap, struct ph_rach_ind_param *rach_ind)
-{
-	struct gsm_lchan *lchan;
-
-	lchan = get_lchan_by_chan_nr(trx, rach_ind->chan_nr);
-
-	handover_rach(lchan, rach_ind->ra, rach_ind->acc_delay);
-
-	/* must return 0, so in case of msg at l1sap, it will be freed */
-	return 0;
-}
-
 static bool rtppayload_is_octet_aligned(const uint8_t *rtp_pl, uint8_t payload_len)
 {
 	/*
@@ -1195,6 +1181,23 @@
 	return true;
 }
 
+/* Special case where handover RACH is detected */
+static int l1sap_handover_rach(struct gsm_bts_trx *trx,
+	struct osmo_phsap_prim *l1sap, struct ph_rach_ind_param *rach_ind)
+{
+	/* Filter out noise / interference / ghosts */
+	if (!rach_pass_filter(rach_ind, trx->bts->role)) {
+		rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_DROP);
+		return 0;
+	}
+
+	handover_rach(get_lchan_by_chan_nr(trx, rach_ind->chan_nr),
+		rach_ind->ra, rach_ind->acc_delay);
+
+	/* must return 0, so in case of msg at l1sap, it will be freed */
+	return 0;
+}
+
 /* RACH received from bts model */
 static int l1sap_ph_rach_ind(struct gsm_bts_trx *trx,
 	 struct osmo_phsap_prim *l1sap, struct ph_rach_ind_param *rach_ind)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94fc15835280d624780200dadc4418210bf565ff
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list