Change in osmocom-bb[master]: trxcon/scheduler: cosmetic: move TDMA frame number calculation

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

fixeria gerrit-no-reply at lists.osmocom.org
Mon Jun 14 21:56:31 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/24660 )


Change subject: trxcon/scheduler: cosmetic: move TDMA frame number calculation
......................................................................

trxcon/scheduler: cosmetic: move TDMA frame number calculation

Change-Id: I79efdfa543d37889dc6749eb25aab4e1639749c6
---
M src/host/trxcon/sched_trx.c
1 file changed, 5 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/60/24660/1

diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c
index 0025e0c..91310c0 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -50,9 +50,13 @@
 	enum trx_lchan_type chan;
 	uint8_t offset, bid;
 	struct trx_ts *ts;
-	uint32_t fn;
 	int i;
 
+	/* Advance TDMA frame number in order to give the transceiver
+	 * more time to handle the burst before the actual transmission. */
+	const uint32_t fn = GSM_TDMA_FN_SUM(sched->fn_counter_proc,
+					    sched->fn_counter_advance);
+
 	/* Iterate over timeslot list */
 	for (i = 0; i < TRX_TS_COUNT; i++) {
 		/* Timeslot is not allocated */
@@ -64,12 +68,6 @@
 		if (ts->mf_layout == NULL)
 			continue;
 
-		/**
-		 * Advance frame number, giving the transceiver more
-		 * time until a burst must be transmitted...
-		 */
-		fn = GSM_TDMA_FN_SUM(sched->fn_counter_proc, sched->fn_counter_advance);
-
 		/* Get frame from multiframe */
 		offset = fn % ts->mf_layout->period;
 		frame = ts->mf_layout->frames + offset;

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

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I79efdfa543d37889dc6749eb25aab4e1639749c6
Gerrit-Change-Number: 24660
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210614/bdfb7e4e/attachment.htm>


More information about the gerrit-log mailing list