diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-12-11 16:25:33 +0100 |
---|---|---|
committer | jolly <andreas@eversberg.eu> | 2023-09-27 14:02:41 +0000 |
commit | d95c8f4fa693c4e34bbbdde171fe1ba096e23825 (patch) | |
tree | 3c1b66fc9f9c3b8dadfb036f0bc00b7afbb03ad2 /src/target/firmware | |
parent | e51391166896ff16a2555ad2154d2225fe09e2e7 (diff) |
Transmit access bursts on DCCH of TCH channels
This is required to access a TCH during handover or to access the uplink
of a VGCS channel.
The patch is taken from the handover branch.
Change-Id: I1a972d9bac5749c67c1b139825400854f7cf1490
Diffstat (limited to 'src/target/firmware')
-rw-r--r-- | src/target/firmware/layer1/prim_rach.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/target/firmware/layer1/prim_rach.c b/src/target/firmware/layer1/prim_rach.c index 9536e5f7..20dab5f2 100644 --- a/src/target/firmware/layer1/prim_rach.c +++ b/src/target/firmware/layer1/prim_rach.c @@ -127,7 +127,7 @@ static uint8_t rach_to_t3_comb[27] = { 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 45, 46}; -/* request a RACH request at the next multiframe T3 = fn51 */ +/* schedule access burst */ void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra) { uint32_t fn_sched; @@ -136,7 +136,19 @@ void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra) offset += 3; local_firq_save(flags); - if (combined) { + if (l1s.dedicated.type == GSM_DCHAN_TCH_F) { + fn_sched = l1s.current_time.fn + offset; + /* go next DCCH frame TCH/F channel */ + if ((fn_sched % 13) == 12) + fn_sched++; + } else if (l1s.dedicated.type == GSM_DCHAN_TCH_H) { + fn_sched = l1s.current_time.fn + offset; + /* go next DCCH frame of TCH/H channel */ + if ((fn_sched % 13) == 12) + fn_sched++; + if ((l1s.dedicated.tn & 1) != ((fn_sched % 13) & 1)) + fn_sched++; + } else if (combined) { /* add elapsed RACH slots to offset */ offset += t3_to_rach_comb[l1s.current_time.t3]; /* offset is the number of RACH slots in the future */ @@ -146,6 +158,7 @@ void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra) } else fn_sched = l1s.current_time.fn + offset; l1s.rach.ra = ra; + fn_sched %= GSM_MAX_FN; sched_gsmtime(rach_sched_set_ul, fn_sched, 0); local_irq_restore(flags); |