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


Change subject: ASCI: Increase channel request history to 5 entries
......................................................................

ASCI: Increase channel request history to 5 entries

3 entries are enough for random access on CCCH. 5 are required for
uplink request on VGCS channel.

The history is used to remember when the random access bursts were send.
The RR layer can check if the IMMEDIATE ASSIGNMENT or VGCS UPLINK GRANT
message has matching frame number and random value of up to 5 random
access bursts previously sent.

Related: OS#5364
Change-Id: I62f18685bf05663f3ee6e94f6884ffb9a6b07ea4
---
M src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
M src/host/layer23/src/mobile/gsm48_rr.c
2 files changed, 25 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/85/34485/1

diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h 
b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
index 299b6e5..fb07cc9 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
@@ -159,7 +159,7 @@

        /* cr_hist */
        uint8_t                 cr_ra; /* stores requested ra until confirmed */
-       struct gsm48_cr_hist    cr_hist[3];
+       struct gsm48_cr_hist    cr_hist[5];

        /* V(SD) sequence numbers */
        uint16_t                v_sd; /* 16 PD 1-bit sequence numbers packed */
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c 
b/src/host/layer23/src/mobile/gsm48_rr.c
index 8c3bbd8..08b208f 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -2364,14 +2364,14 @@
  */

 /* match request reference against request history */
-static int gsm48_match_ra(struct osmocom_ms *ms, struct gsm48_req_ref *ref)
+static int gsm48_match_ra(struct osmocom_ms *ms, struct gsm48_req_ref *ref, 
int hist_num)
 {
        struct gsm48_rrlayer *rr = &ms->rrlayer;
        int i;
        uint8_t ia_t1, ia_t2, ia_t3;
        uint8_t cr_t1, cr_t2, cr_t3;

-       for (i = 0; i < 3; i++) {
+       for (i = 0; i < hist_num; i++) {
                /* filter confirmed RACH requests only */
                if (rr->cr_hist[i].valid && ref->ra == rr->cr_hist[i].ref.ra) {
                        ia_t1 = ref->t1;
@@ -2492,7 +2492,7 @@
        }

        /* request ref */
-       if (gsm48_match_ra(ms, &ia->req_ref)) {
+       if (gsm48_match_ra(ms, &ia->req_ref, 3)) {
                /* channel description */
                memcpy(&rr->cd_now, &cd, sizeof(rr->cd_now));
                /* timing advance */
@@ -2640,7 +2640,7 @@
        }

        /* request ref 1 */
-       if (gsm48_match_ra(ms, &ia->req_ref1)) {
+       if (gsm48_match_ra(ms, &ia->req_ref1, 3)) {
                /* channel description */
                memcpy(&rr->cd_now, &cd1, sizeof(rr->cd_now));
                /* timing advance */
@@ -2656,7 +2656,7 @@
                return gsm48_rr_dl_est(ms);
        }
        /* request ref 2 */
-       if (gsm48_match_ra(ms, &ia->req_ref2)) {
+       if (gsm48_match_ra(ms, &ia->req_ref2, 3)) {
                /* channel description */
                memcpy(&rr->cd_now, &cd2, sizeof(rr->cd_now));
                /* timing advance */
@@ -2706,7 +2706,7 @@
                                (((uint8_t *)&ia->req_ref1) + i * 4);
                LOGP(DRR, LOGL_INFO, "IMMEDIATE ASSIGNMENT REJECT "
                        "(ref 0x%02x)\n", req_ref->ra);
-               if (gsm48_match_ra(ms, req_ref)) {
+               if (gsm48_match_ra(ms, req_ref, 3)) {
                        /* wait indication */
                        t3122_value = *(((uint8_t *)&ia->wait_ind1) + i * 4);
                        if (t3122_value)

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34485?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: I62f18685bf05663f3ee6e94f6884ffb9a6b07ea4
Gerrit-Change-Number: 34485
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andr...@eversberg.eu>
Gerrit-MessageType: newchange

Reply via email to