pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/34020 )

Change subject: gmm: Several fixes for radio_prio
......................................................................

gmm: Several fixes for radio_prio

The "Radio Priority" received in GMM Attach Accept are for SMS and TOM8
SAPs only. For GMM/SM unitdata transferred to LLC, use highest
radio_prio=1.

Change-Id: Ie583c433547fb5ecbb6b6077c39a157961f73cfc
---
M include/osmocom/gprs/gmm/gmm_private.h
M src/gmm/gmm.c
M src/gmm/gmm_prim.c
3 files changed, 27 insertions(+), 12 deletions(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved




diff --git a/include/osmocom/gprs/gmm/gmm_private.h 
b/include/osmocom/gprs/gmm/gmm_private.h
index 2abd583..db2cc8e 100644
--- a/include/osmocom/gprs/gmm/gmm_private.h
+++ b/include/osmocom/gprs/gmm/gmm_private.h
@@ -64,7 +64,8 @@
        char imei[GSM23003_IMEI_NUM_DIGITS + 1];
        char imeisv[GSM23003_IMEISV_NUM_DIGITS+1];

-       uint8_t radio_prio;     /* TS 24.008 10.5.7.2 */
+       uint8_t radio_prio_sms; /* TS 24.008 10.5.7.2 */
+       uint8_t radio_prio_tom8; /* TS 24.008 10.5.7.2 */
        struct gprs_ra_id ra; /* TS 24.008  10.5.5.15 (decoded) */
        bool pdp_ctx_status_present;
        uint8_t pdp_ctx_status[2]; /* TS 24.008 10.5.7.1 */
diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c
index e3afc18..7be6c13 100644
--- a/src/gmm/gmm.c
+++ b/src/gmm/gmm.c
@@ -581,9 +581,9 @@
        }
        llc_prim->ll.l3_pdu = msg->l3h;
        llc_prim->ll.l3_pdu_len = msgb_l3len(msg);
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
-       llc_prim->ll.radio_prio;
        llc_prim->ll.apply_gea;
        llc_prim->ll.apply_gia;
        */
@@ -615,9 +615,9 @@
        }
        llc_prim->ll.l3_pdu = msg->l3h;
        llc_prim->ll.l3_pdu_len = msgb_l3len(msg);
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
-       llc_prim->ll.radio_prio;
        llc_prim->ll.apply_gea;
        llc_prim->ll.apply_gia;
        */
@@ -652,9 +652,9 @@
        }
        llc_prim->ll.l3_pdu = msg->l3h;
        llc_prim->ll.l3_pdu_len = msgb_l3len(msg);
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
-       llc_prim->ll.radio_prio;
        llc_prim->ll.apply_gea;
        llc_prim->ll.apply_gia;
        */
@@ -684,9 +684,9 @@
        }
        llc_prim->ll.l3_pdu = msg->l3h;
        llc_prim->ll.l3_pdu_len = msgb_l3len(msg);
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
-       llc_prim->ll.radio_prio;
        llc_prim->ll.apply_gea;
        llc_prim->ll.apply_gia;
        */
@@ -718,9 +718,9 @@
        }
        llc_prim->ll.l3_pdu = msg->l3h;
        llc_prim->ll.l3_pdu_len = msgb_l3len(msg);
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
-       llc_prim->ll.radio_prio;
        llc_prim->ll.apply_gea;
        llc_prim->ll.apply_gia;
        */
@@ -750,9 +750,9 @@
        }
        llc_prim->ll.l3_pdu = msg->l3h;
        llc_prim->ll.l3_pdu_len = msgb_l3len(msg);
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
-       llc_prim->ll.radio_prio;
        llc_prim->ll.apply_gea;
        llc_prim->ll.apply_gia;
        */
@@ -784,9 +784,9 @@
        }
        llc_prim->ll.l3_pdu = msg->l3h;
        llc_prim->ll.l3_pdu_len = msgb_l3len(msg);
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
-       llc_prim->ll.radio_prio;
        llc_prim->ll.apply_gea;
        llc_prim->ll.apply_gia;
        */
@@ -825,9 +825,9 @@
        }
        llc_prim->ll.l3_pdu = msg->l3h;
        llc_prim->ll.l3_pdu_len = msgb_l3len(msg);
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
-       llc_prim->ll.radio_prio;
        llc_prim->ll.apply_gea;
        llc_prim->ll.apply_gia;
        */
@@ -857,9 +857,9 @@
        }
        llc_prim->ll.l3_pdu = msg->l3h;
        llc_prim->ll.l3_pdu_len = msgb_l3len(msg);
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
-       llc_prim->ll.radio_prio;
        llc_prim->ll.apply_gea;
        llc_prim->ll.apply_gia;
        */
@@ -886,7 +886,8 @@
        aa = (struct gsm48_attach_ack *)&gh->data[0];

        periodic_rau_sec = gprs_gmm_gprs_tmr_to_secs(aa->ra_upd_timer);
-       gmme->radio_prio = aa->radio_prio;
+       gmme->radio_prio_sms = aa->radio_prio >> 4;
+       gmme->radio_prio_tom8 = aa->radio_prio & 0x0f;
        gmme->t3312_assigned_sec = periodic_rau_sec >= 0 ? periodic_rau_sec : 0;
        if (gmme->t3312_assigned_sec == 0)
                gprs_gmm_gmme_t3312_stop(gmme);
diff --git a/src/gmm/gmm_prim.c b/src/gmm/gmm_prim.c
index 3beaea8..693a811 100644
--- a/src/gmm/gmm_prim.c
+++ b/src/gmm/gmm_prim.c
@@ -541,7 +541,7 @@
                        gmme->tlli, OSMO_GPRS_LLC_SAPI_GMM,
                        gmm_prim->gmmsm.unitdata_req.smpdu,
                        gmm_prim->gmmsm.unitdata_req.smpdu_len);
-       llc_prim->ll.unitdata_req.radio_prio = gmme->radio_prio;
+       llc_prim->ll.unitdata_req.radio_prio = 1; /* highest */
        /* TODO:
        llc_prim->ll.qos_params.*;
        llc_prim->ll.apply_gea;

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

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Ie583c433547fb5ecbb6b6077c39a157961f73cfc
Gerrit-Change-Number: 34020
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to