trxcon/scheduler: cosmetic: move TDMA frame number calculation
Change-Id: I79efdfa543d37889dc6749eb25aab4e1639749c6
This commit is contained in:
parent
e4d5bbccf9
commit
c652349b4a
|
@ -50,9 +50,13 @@ static void sched_frame_clck_cb(struct trx_sched *sched)
|
||||||
enum trx_lchan_type chan;
|
enum trx_lchan_type chan;
|
||||||
uint8_t offset, bid;
|
uint8_t offset, bid;
|
||||||
struct trx_ts *ts;
|
struct trx_ts *ts;
|
||||||
uint32_t fn;
|
|
||||||
int i;
|
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 */
|
/* Iterate over timeslot list */
|
||||||
for (i = 0; i < TRX_TS_COUNT; i++) {
|
for (i = 0; i < TRX_TS_COUNT; i++) {
|
||||||
/* Timeslot is not allocated */
|
/* Timeslot is not allocated */
|
||||||
|
@ -64,12 +68,6 @@ static void sched_frame_clck_cb(struct trx_sched *sched)
|
||||||
if (ts->mf_layout == NULL)
|
if (ts->mf_layout == NULL)
|
||||||
continue;
|
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 */
|
/* Get frame from multiframe */
|
||||||
offset = fn % ts->mf_layout->period;
|
offset = fn % ts->mf_layout->period;
|
||||||
frame = ts->mf_layout->frames + offset;
|
frame = ts->mf_layout->frames + offset;
|
||||||
|
|
Loading…
Reference in New Issue