pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33772 )
Change subject: gmm: Make OSMO_GPRS_GMM_TLLI_UNASSIGNED def publicly available ......................................................................
gmm: Make OSMO_GPRS_GMM_TLLI_UNASSIGNED def publicly available
This can be used for users receiving the GMMRR_ASSIGN_REQ primitive to find out if it's a creation, update or deletion of a TLLI.
Change-Id: I881b1370b283ceee98c035ed42b91f7e12611979 --- M include/osmocom/gprs/gmm/gmm.h M include/osmocom/gprs/gmm/gmm_private.h M src/gmm/gmm.c M src/rlcmac/gre.c 4 files changed, 18 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/72/33772/1
diff --git a/include/osmocom/gprs/gmm/gmm.h b/include/osmocom/gprs/gmm/gmm.h index 49954e8..1fcd95b 100644 --- a/include/osmocom/gprs/gmm/gmm.h +++ b/include/osmocom/gprs/gmm/gmm.h @@ -5,6 +5,9 @@ #include <stdint.h> #include <stddef.h>
+/* 3GPP TS 44.064 § 8.3 TLLI assignment procedures */ +#define OSMO_GPRS_GMM_TLLI_UNASSIGNED (0xffffffff) + /* Use stack as MS or as network? */ enum osmo_gprs_gmm_location { OSMO_GPRS_GMM_LOCATION_UNSET, diff --git a/include/osmocom/gprs/gmm/gmm_private.h b/include/osmocom/gprs/gmm/gmm_private.h index 5a29600..66ea8d7 100644 --- a/include/osmocom/gprs/gmm/gmm_private.h +++ b/include/osmocom/gprs/gmm/gmm_private.h @@ -19,9 +19,6 @@ #include <osmocom/gprs/gmm/gmm_prim.h> #include <osmocom/gprs/gmm/gmm_ms_fsm.h>
-/* 3GPP TS 44.064 § 8.3 TLLI assignment procedures */ -#define GPRS_GMM_TLLI_UNASSIGNED (0xffffffff) - #define GPRS_GMM_SESS_ID_UNASSIGNED (0xffffffff)
extern int g_gmm_log_cat[_OSMO_GPRS_GMM_LOGC_MAX]; diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index 9f7a9fd..8a293a3 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -165,7 +165,7 @@ gmme->ptmsi_sig = GSM_RESERVED_TMSI; gmme->ptmsi = ptmsi; gmme->old_ptmsi = GSM_RESERVED_TMSI; - gmme->old_tlli = GPRS_GMM_TLLI_UNASSIGNED; + gmme->old_tlli = OSMO_GPRS_GMM_TLLI_UNASSIGNED; gmme->auth_ciph.req.ac_ref_nr = 0xff; /* invalid value */ OSMO_STRLCPY_ARRAY(gmme->imsi, imsi);
@@ -299,7 +299,7 @@ rc = -ERANGE; failed: LOGGMM(LOGL_ERROR, "Failed to allocate a TLLI: %d (%s)\n", rc, strerror(-rc)); - return GPRS_GMM_TLLI_UNASSIGNED; + return OSMO_GPRS_GMM_TLLI_UNASSIGNED; }
/* TS 24.008 4.7.2.1.1 READY timer behaviour (A/Gb mode only) */ @@ -1000,7 +1000,7 @@
/* Submit LLGMM-ASSIGN-REQ as per TS 24.007 Annex C.3 */ gmme->old_tlli = gmme->tlli; - gmme->tlli = GPRS_GMM_TLLI_UNASSIGNED; + gmme->tlli = OSMO_GPRS_GMM_TLLI_UNASSIGNED; rc = gprs_gmm_submit_llgmm_assing_req(gmme); if (rc < 0) goto rejected; diff --git a/src/rlcmac/gre.c b/src/rlcmac/gre.c index b941435..f23defd 100644 --- a/src/rlcmac/gre.c +++ b/src/rlcmac/gre.c @@ -39,7 +39,6 @@ /* We have to defer going to CCCH a bit to leave space for last PKT CTRL ACK to be transmitted */ static void _defer_pkt_idle_timer_cb(void *data) { - //struct gprs_rlcmac_entity *gre = data; gprs_rlcmac_submit_l1ctl_pdch_rel_req(); /* Wait for L1CTL-CCCH_READY.ind before attempting new pkt-access-procedure if needed. */ }