summaryrefslogtreecommitdiffstats
path: root/src/target/firmware
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-09-05 14:12:20 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2023-09-28 10:42:38 +0200
commit23d46f003f7cbb8d2c39b6285c1e22fd692f9631 (patch)
treee4a0ba4e4707e53d97416d1ab497e3cce0e21e12 /src/target/firmware
parentd95c8f4fa693c4e34bbbdde171fe1ba096e23825 (diff)
ASCI: Add UIC support to random access burst
A different identity code can be used on uplink access bursts on voice group channel. This is optional for the network, but mandatory for the MS side. If the network does not define a UIC, the BSIC is used instead. BSIC is used for RACH channel and handover. Related: OS#5364 Change-Id: I4039734676949aefa5be4b5298764b8ba7e1b8ed
Diffstat (limited to 'src/target/firmware')
-rw-r--r--src/target/firmware/include/layer1/prim.h2
-rw-r--r--src/target/firmware/include/layer1/sync.h1
-rw-r--r--src/target/firmware/layer1/l23_api.c7
-rw-r--r--src/target/firmware/layer1/prim_rach.c9
4 files changed, 12 insertions, 7 deletions
diff --git a/src/target/firmware/include/layer1/prim.h b/src/target/firmware/include/layer1/prim.h
index 30c51ae6..4e34bb23 100644
--- a/src/target/firmware/include/layer1/prim.h
+++ b/src/target/firmware/include/layer1/prim.h
@@ -20,7 +20,7 @@ void l1s_nb_test(uint8_t base_fn);
void l1s_fbsb_req(uint8_t base_fn, struct l1ctl_fbsb_req *req);
void l1a_freq_req(uint32_t fn_sched);
-void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra);
+void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra, uint8_t uic);
/* Primitives raw scheduling sets */
extern const struct tdma_sched_item nb_sched_set[];
diff --git a/src/target/firmware/include/layer1/sync.h b/src/target/firmware/include/layer1/sync.h
index ff56354b..e0a4412f 100644
--- a/src/target/firmware/include/layer1/sync.h
+++ b/src/target/firmware/include/layer1/sync.h
@@ -117,6 +117,7 @@ struct l1s_state {
struct {
uint8_t ra;
+ uint8_t uic;
} rach;
struct {
diff --git a/src/target/firmware/layer1/l23_api.c b/src/target/firmware/layer1/l23_api.c
index 68bb2c0e..f4309e2a 100644
--- a/src/target/firmware/layer1/l23_api.c
+++ b/src/target/firmware/layer1/l23_api.c
@@ -386,11 +386,10 @@ static void l1ctl_rx_rach_req(struct msgb *msg)
struct l1ctl_info_ul *ul = (struct l1ctl_info_ul *) l1h->data;
struct l1ctl_rach_req *rach_req = (struct l1ctl_rach_req *) ul->payload;
- printd("L1CTL_RACH_REQ (ra=0x%02x, offset=%d, combined=%d)\n",
- rach_req->ra, ntohs(rach_req->offset), rach_req->combined);
+ printd("L1CTL_RACH_REQ (ra=0x%02x, offset=%d, combined=%d, uic=0x%02x)\n",
+ rach_req->ra, ntohs(rach_req->offset), rach_req->combined, rach_req->uic);
- l1a_rach_req(ntohs(rach_req->offset), rach_req->combined,
- rach_req->ra);
+ l1a_rach_req(ntohs(rach_req->offset), rach_req->combined, rach_req->ra, rach_req->uic);
}
/* receive a L1CTL_DATA_REQ from L23 */
diff --git a/src/target/firmware/layer1/prim_rach.c b/src/target/firmware/layer1/prim_rach.c
index 20dab5f2..580131ec 100644
--- a/src/target/firmware/layer1/prim_rach.c
+++ b/src/target/firmware/layer1/prim_rach.c
@@ -62,7 +62,11 @@ static int l1s_tx_rach_cmd(__unused uint8_t p1, __unused uint8_t p2, __unused ui
l1s_tx_apc_helper(l1s.serving_cell.arfcn);
- data[0] = l1s.serving_cell.bsic << 2;
+ /* If an invalid UIC is given, use BSIC. */
+ if (l1s.rach.uic > 0x3f)
+ data[0] = l1s.serving_cell.bsic << 2;
+ else
+ data[0] = l1s.rach.uic << 2;
data[1] = l1s.rach.ra;
info_ptr = &dsp_api.ndb->d_rach;
@@ -128,7 +132,7 @@ static uint8_t rach_to_t3_comb[27] = {
45, 46};
/* schedule access burst */
-void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra)
+void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra, uint8_t uic)
{
uint32_t fn_sched;
unsigned long flags;
@@ -158,6 +162,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;
+ l1s.rach.uic = uic;
fn_sched %= GSM_MAX_FN;
sched_gsmtime(rach_sched_set_ul, fn_sched, 0);
local_irq_restore(flags);