Change in osmo-bts[master]: osmo-bts-trx: general handling of NOPE / IDLE indications

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/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Nov 19 01:01:45 UTC 2019


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

Change subject: osmo-bts-trx: general handling of NOPE / IDLE indications
......................................................................

osmo-bts-trx: general handling of NOPE / IDLE indications

Each logical channel can now optionally have an additional handler,
that will be called when a NOPE / IDLE indication is received from
the transceiver. The aim of that handler is to keep the logical
channel state updated in case if one or more Uplink bursts are lost.

Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637
Related: OS#3428
---
M include/osmo-bts/scheduler_backend.h
M src/common/scheduler.c
M src/osmo-bts-trx/trx_if.c
3 files changed, 20 insertions(+), 8 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  dexter: Looks good to me, but someone else must approve; Verified
  Jenkins Builder: Verified



diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h
index d713900..51c957c 100644
--- a/include/osmo-bts/scheduler_backend.h
+++ b/include/osmo-bts/scheduler_backend.h
@@ -31,6 +31,8 @@
 	trx_sched_dl_func	*dl_fn;
 	/*! \brief function to call when burst received from PHY */
 	trx_sched_ul_func	*ul_fn;
+	/*! \brief function to call when NOPE.ind received from PHY */
+	trx_sched_ul_func	*nope_fn;
 	/*! \brief channel flags, see TRX_CHAN_FLAG_* */
 	uint8_t			flags;
 };
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 3adfc49..fe93c32 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -1349,6 +1349,13 @@
 	l1cs = &l1ts->chan_state[chan];
 	func = trx_chan_desc[chan].ul_fn;
 
+	/* TODO: handle noise measurements */
+	if (chan == TRXC_IDLE && bi->flags & TRX_BI_F_NOPE_IND) {
+		LOGL1S(DL1P, LOGL_DEBUG, l1t, bi->tn, chan, bi->fn,
+		       "Rx noise measurement (%d)\n", bi->rssi);
+		return -ENOTSUP;
+	}
+
 	/* check if channel is active */
 	if (!TRX_CHAN_IS_ACTIVE(l1cs, chan))
 		return -EINVAL;
@@ -1364,6 +1371,14 @@
 	l1cs->last_tdma_fn = bi->fn;
 	l1cs->proc_tdma_fs++;
 
+	/* handle NOPE indications (if the handler is present) */
+	if (bi->flags & TRX_BI_F_NOPE_IND) {
+		func = trx_chan_desc[chan].nope_fn;
+		if (!func)
+			return 0;
+		return func(l1t, chan, bid, bi);
+	}
+
 	/* decrypt */
 	if (bi->burst_len && l1cs->ul_encr_algo) {
 		ubit_t ks[114];
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 920f441..dbf7805 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -1018,14 +1018,8 @@
 	if (hdr_len < 0)
 		return hdr_len;
 
-	/* TODO: we can use NOPE indications to get noise levels on IDLE
-	 * TDMA frames, and properly drive scheduler if nothing has been
-	 * detected on non-IDLE channels. */
-	if (bi.flags & TRX_BI_F_NOPE_IND) {
-		LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG,
-			"IDLE / NOPE indications are not (yet) supported\n");
-		return -ENOTSUP;
-	}
+	if (bi.flags & TRX_BI_F_NOPE_IND)
+		goto skip_burst;
 
 	/* We're done with the header now */
 	buf_len -= hdr_len;
@@ -1047,6 +1041,7 @@
 	if (rc < 0)
 		return rc;
 
+skip_burst:
 	/* Print header & burst info */
 	LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG, "Rx %s (hdr_ver=%u): %s\n",
 		(bi.flags & TRX_BI_F_NOPE_IND) ? "NOPE.ind" : "UL burst",

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I71c552f44c25e56e9779d8b8ef5d4de9f8475637
Gerrit-Change-Number: 15989
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191119/07b1717a/attachment.htm>


More information about the gerrit-log mailing list