jolly has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/34482?usp=email )


Change subject: ASCI: Add UIC support to random access burst
......................................................................

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
---
M include/l1ctl_proto.h
M src/host/layer23/include/osmocom/bb/common/l1ctl.h
M src/host/layer23/src/common/l1ctl.c
M src/host/layer23/src/common/l1ctl_lapdm_glue.c
M src/host/layer23/src/modem/grr.c
M src/target/firmware/include/layer1/prim.h
M src/target/firmware/include/layer1/sync.h
M src/target/firmware/layer1/l23_api.c
M src/target/firmware/layer1/prim_rach.c
9 files changed, 35 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/82/34482/1

diff --git a/include/l1ctl_proto.h b/include/l1ctl_proto.h
index ab37746..2f7e8c8 100644
--- a/include/l1ctl_proto.h
+++ b/include/l1ctl_proto.h
@@ -229,6 +229,7 @@
        uint8_t ra;
        uint8_t combined;
        uint16_t offset;
+       int8_t uic;
 } __attribute__((packed));


diff --git a/src/host/layer23/include/osmocom/bb/common/l1ctl.h 
b/src/host/layer23/include/osmocom/bb/common/l1ctl.h
index fbfb766..f8c79db 100644
--- a/src/host/layer23/include/osmocom/bb/common/l1ctl.h
+++ b/src/host/layer23/include/osmocom/bb/common/l1ctl.h
@@ -23,7 +23,7 @@
 /* Transmit L1CTL_RACH_REQ */
 int l1ctl_tx_rach_req(struct osmocom_ms *ms,
                      uint8_t chan_nr, uint8_t link_id,
-                     uint8_t ra, uint16_t offset, uint8_t combined);
+                     uint8_t ra, uint16_t offset, uint8_t combined, int8_t 
uic);

 /* Transmit L1CTL_DM_EST_REQ */
 int l1ctl_tx_dm_est_req_h0(struct osmocom_ms *ms, uint16_t band_arfcn, uint8_t 
chan_nr, uint8_t tsc,
diff --git a/src/host/layer23/src/common/l1ctl.c 
b/src/host/layer23/src/common/l1ctl.c
index 8a66af8..65f78cf 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -513,7 +513,7 @@
 /* Transmit L1CTL_RACH_REQ */
 int l1ctl_tx_rach_req(struct osmocom_ms *ms,
                      uint8_t chan_nr, uint8_t link_id,
-                     uint8_t ra, uint16_t offset, uint8_t combined)
+                     uint8_t ra, uint16_t offset, uint8_t combined, int8_t uic)
 {
        struct msgb *msg;
        struct l1ctl_info_ul *ul;
@@ -523,7 +523,7 @@
        if (!msg)
                return -1;

-       DEBUGP(DL1C, "RACH Req. offset=%d combined=%d\n", offset, combined);
+       DEBUGP(DL1C, "RACH Req. offset=%d combined=%d uic=%d\n", offset, 
combined, uic);
        ul = (struct l1ctl_info_ul *) msgb_put(msg, sizeof(*ul));
        ul->chan_nr = chan_nr;
        ul->link_id = link_id;
@@ -531,6 +531,7 @@
        req->ra = ra;
        req->offset = htons(offset);
        req->combined = combined;
+       req->uic = uic;

        return osmo_send_l1(ms, msg);
 }
diff --git a/src/host/layer23/src/common/l1ctl_lapdm_glue.c 
b/src/host/layer23/src/common/l1ctl_lapdm_glue.c
index 601bed6..c28d63d 100644
--- a/src/host/layer23/src/common/l1ctl_lapdm_glue.c
+++ b/src/host/layer23/src/common/l1ctl_lapdm_glue.c
@@ -52,7 +52,8 @@
                                       RSL_CHAN_RACH, 0x00,
                                       pp->u.rach_req.ra,
                                       pp->u.rach_req.offset,
-                                      pp->u.rach_req.is_combined_ccch);
+                                      pp->u.rach_req.is_combined_ccch,
+                                      -1);
                break;
        default:
                rc = -EINVAL;
diff --git a/src/host/layer23/src/modem/grr.c b/src/host/layer23/src/modem/grr.c
index 24411f7..3892af4 100644
--- a/src/host/layer23/src/modem/grr.c
+++ b/src/host/layer23/src/modem/grr.c
@@ -558,7 +558,7 @@

                LOGPFSML(fi, LOGL_INFO, "Sending CHANNEL REQUEST (0x%02x)\n", 
rr->cr_ra);
                l1ctl_tx_rach_req(ms, RSL_CHAN_RACH, 0x00, rr->cr_ra, 0,
-                                 ms->cellsel.ccch_mode == CCCH_MODE_COMBINED);
+                                 ms->cellsel.ccch_mode == CCCH_MODE_COMBINED, 
-1);

                rr->state = GSM48_RR_ST_CONN_PEND;
                break;
diff --git a/src/target/firmware/include/layer1/prim.h 
b/src/target/firmware/include/layer1/prim.h
index 30c51ae..6d1d0b2 100644
--- a/src/target/firmware/include/layer1/prim.h
+++ b/src/target/firmware/include/layer1/prim.h
@@ -20,7 +20,7 @@

 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, int8_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 ff56354..7b049c4 100644
--- a/src/target/firmware/include/layer1/sync.h
+++ b/src/target/firmware/include/layer1/sync.h
@@ -117,6 +117,7 @@

        struct {
                uint8_t         ra;
+               int8_t          uic;
        } rach;

        struct {
diff --git a/src/target/firmware/layer1/l23_api.c 
b/src/target/firmware/layer1/l23_api.c
index 68bb2c0..ccbdf1a 100644
--- a/src/target/firmware/layer1/l23_api.c
+++ b/src/target/firmware/layer1/l23_api.c
@@ -386,11 +386,10 @@
        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=%d)\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 c342142..07058f0 100644
--- a/src/target/firmware/layer1/prim_rach.c
+++ b/src/target/firmware/layer1/prim_rach.c
@@ -61,8 +61,11 @@
        putchart('T');

        l1s_tx_apc_helper(l1s.serving_cell.arfcn);
-
-       data[0] = l1s.serving_cell.bsic << 2;
+
+       if (l1s.rach.uic < 0)
+               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 +131,7 @@
        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, int8_t uic)
 {
        uint32_t fn_sched;
        unsigned long flags;
@@ -158,6 +161,7 @@
        } else
                fn_sched = l1s.current_time.fn + offset;
        l1s.rach.ra = ra;
+       l1s.rach.uic = uic;
        fn_sched %= 2715648;
        sched_gsmtime(rach_sched_set_ul, fn_sched, 0);
        local_irq_restore(flags);

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34482?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I4039734676949aefa5be4b5298764b8ba7e1b8ed
Gerrit-Change-Number: 34482
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andr...@eversberg.eu>
Gerrit-MessageType: newchange

Reply via email to