pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/33958 )


Change subject: llc: Set proper Radio Priority when submitting GRR-UNITDATA.req
......................................................................

llc: Set proper Radio Priority when submitting GRR-UNITDATA.req

Change-Id: I2ace165003469c2a43d7333634171896699d5a5d
---
M include/osmocom/gprs/llc/llc_private.h
M src/llc/llc.c
M src/llc/llc_ll.c
M src/llc/llc_llgmm.c
4 files changed, 20 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/58/33958/1

diff --git a/include/osmocom/gprs/llc/llc_private.h 
b/include/osmocom/gprs/llc/llc_private.h
index e5c197e..2d3f02f 100644
--- a/include/osmocom/gprs/llc/llc_private.h
+++ b/include/osmocom/gprs/llc/llc_private.h
@@ -323,7 +323,7 @@
 int gprs_llc_lle_tx_xid(const struct gprs_llc_lle *lle, uint8_t *xid_payload, 
unsigned int xid_payload_len, bool is_cmd);
 int gprs_llc_lle_tx_xid_req(struct gprs_llc_lle *lle, uint8_t *l3par, unsigned 
int l3par_len);
 int gprs_llc_lle_tx_xid_resp(struct gprs_llc_lle *lle, uint8_t *l3par, 
unsigned int l3par_len);
-int gprs_llc_lle_tx_ui(struct gprs_llc_lle *lle, uint8_t *l3_pdu, size_t 
l3_pdu_len, bool encryptable);
+int gprs_llc_lle_tx_ui(struct gprs_llc_lle *lle, uint8_t *l3_pdu, size_t 
l3_pdu_len, bool encryptable, uint8_t radio_prio);
 int gprs_llc_lle_tx_null(const struct gprs_llc_lle *lle);

 /* llc_prim.c: */
diff --git a/src/llc/llc.c b/src/llc/llc.c
index d58b454..cff6c16 100644
--- a/src/llc/llc.c
+++ b/src/llc/llc.c
@@ -255,6 +255,7 @@
        int rc;
        struct msgb *msg;
        struct osmo_gprs_llc_prim *llc_prim;
+       const uint8_t radio_prio = 1; /* Use highest prio for GMM messages, TS 
24.008 10.5.7.2 */
        struct gprs_llc_pdu_decoded pdu_dec = {
                .sapi = lle->sapi,
                .fmt = OSMO_GPRS_LLC_FMT_U,
@@ -287,6 +288,7 @@
                llc_prim->grr.ll_pdu = msgb_l3(msg);
                llc_prim->grr.ll_pdu_len = msgb_l3len(msg);
                llc_prim->grr.unitdata_req.sapi = lle->sapi;
+               llc_prim->grr.unitdata_req.radio_prio = radio_prio;
        }

        /* Send GRR-UNITDATA.req */
@@ -299,6 +301,7 @@
 {
        int rc;
        struct msgb *msg;
+       const uint8_t radio_prio = 4; /* Use lowest prio for GMM messages, TS 
24.008 10.5.7.2 */
        struct gprs_llc_pdu_decoded pdu_dec = {
                .sapi = lle->sapi,
                .fmt = OSMO_GPRS_LLC_FMT_U,
@@ -329,6 +332,7 @@
                llc_prim->grr.ll_pdu = msgb_l3(msg);
                llc_prim->grr.ll_pdu_len = msgb_l3len(msg);
                llc_prim->grr.unitdata_req.sapi = lle->sapi;
+               llc_prim->grr.unitdata_req.radio_prio = radio_prio;
        }

        /* Send BSSGP-DL-UNITDATA.req (SGSN) / GRR-UNITDATA.req (MS) */
@@ -340,7 +344,7 @@
    'encryptable' indicates whether particular message can be encrypted 
according
    to 3GPP TS 24.008 ยง 4.7.1.2
  */
-int gprs_llc_lle_tx_ui(struct gprs_llc_lle *lle, uint8_t *l3_pdu, size_t 
l3_pdu_len, bool encryptable)
+int gprs_llc_lle_tx_ui(struct gprs_llc_lle *lle, uint8_t *l3_pdu, size_t 
l3_pdu_len, bool encryptable, uint8_t radio_prio)
 {
        struct osmo_gprs_llc_prim *llc_prim;
        struct msgb *msg;
@@ -393,6 +397,7 @@
                llc_prim->grr.ll_pdu = msgb_l3(msg);
                llc_prim->grr.ll_pdu_len = msgb_l3len(msg);
                llc_prim->grr.unitdata_req.sapi = lle->sapi;
+               llc_prim->grr.unitdata_req.radio_prio = radio_prio;
        }

        /* Increment V(U) */
diff --git a/src/llc/llc_ll.c b/src/llc/llc_ll.c
index 2df6e33..28420a7 100644
--- a/src/llc/llc_ll.c
+++ b/src/llc/llc_ll.c
@@ -309,7 +309,8 @@
        }

        rc = gprs_llc_lle_tx_ui(lle, llc_prim->ll.l3_pdu, 
llc_prim->ll.l3_pdu_len,
-                               llc_prim->ll.unitdata_req.apply_gea);
+                               llc_prim->ll.unitdata_req.apply_gea,
+                               llc_prim->ll.unitdata_req.radio_prio);

 ret_free:
        msgb_free(llc_prim->oph.msg);
diff --git a/src/llc/llc_llgmm.c b/src/llc/llc_llgmm.c
index f33d6de..438de51 100644
--- a/src/llc/llc_llgmm.c
+++ b/src/llc/llc_llgmm.c
@@ -283,6 +283,7 @@
        struct gprs_llc_lle *lle;
        int rc;
        struct gprs_llc_llme *llme = 
gprs_llc_find_llme_by_tlli(llc_prim->llgmm.tlli);
+       const uint8_t radio_prio = 1; /* Use highest prio for GMM messages, TS 
24.008 10.5.7.2 */

        if (!llme) {
                LOGLLC(LOGL_NOTICE, "Rx %s: Unknown TLLI 0x%08x\n",
@@ -308,7 +309,7 @@
        case OSMO_GPRS_LLC_LLGM_TRIGGER_CELL_UPDATE:
        case OSMO_GPRS_LLC_LLGM_TRIGGER_PAGE_RESP:
        default:
-               rc = gprs_llc_lle_tx_ui(lle, NULL, 0, false);
+               rc = gprs_llc_lle_tx_ui(lle, NULL, 0, false, radio_prio);
                break;
        }


--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33958
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I2ace165003469c2a43d7333634171896699d5a5d
Gerrit-Change-Number: 33958
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to