diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-06-14 15:26:25 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-06-16 15:05:51 +0200 |
commit | c652349b4a771189f8787e11764a41916e3004b5 (patch) | |
tree | db5186f23a9641d498b224ebf86e24300f8c41bd | |
parent | e4d5bbccf9ff6e922cc2e32df1c3b626e6232eed (diff) |
trxcon/scheduler: cosmetic: move TDMA frame number calculation
Change-Id: I79efdfa543d37889dc6749eb25aab4e1639749c6
-rw-r--r-- | src/host/trxcon/sched_trx.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index 0025e0cc..91310c09 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -50,9 +50,13 @@ static void sched_frame_clck_cb(struct trx_sched *sched) 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 @@ static void sched_frame_clck_cb(struct trx_sched *sched) 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; |