aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-09-02 13:43:51 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-02 14:03:04 +0200
commit33ebedc3d595da143bbeb2dd6a476ee0134d9858 (patch)
treee6e782ff859d502f16e805ea3eba5e6693807ec2
parentab264ebba8d9b4b7f604d292f80be828c0734f33 (diff)
gmm: Move code handling GMM PTMSI Realloc Complete to its own function
-rw-r--r--src/sgsn/gprs_gmm.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c
index ea6daae17..399f7bf89 100644
--- a/src/sgsn/gprs_gmm.c
+++ b/src/sgsn/gprs_gmm.c
@@ -1789,6 +1789,22 @@ static int gsm48_rx_gmm_ra_upd_compl(struct sgsn_mm_ctx *mmctx)
return 0;
}
+/* 3GPP TS 24.008 § 9.4.8: P-TMSI reallocation complete */
+static int gsm48_rx_gmm_ptmsi_reall_compl(struct sgsn_mm_ctx *mmctx)
+{
+ LOGMMCTXP(LOGL_INFO, mmctx, "-> PTMSI REALLOCATION COMPLETE\n");
+ mmctx_timer_stop(mmctx, 3350);
+ mmctx->t3350_mode = GMM_T3350_MODE_NONE;
+ mmctx->p_tmsi_old = 0;
+ mmctx->pending_req = 0;
+ if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) {
+ /* Unassign the old TLLI */
+ mmctx->gb.tlli = mmctx->gb.tlli_new;
+ //gprs_llgmm_assign(mmctx->gb.llme, TLLI_UNASSIGNED, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL);
+ }
+ return 0;
+}
+
/* 3GPP TS 24.008 § 9.4.20 Service request.
* In Iu, a UE in PMM-IDLE mode can use GSM48_MT_GMM_SERVICE_REQ to switch back
* to PMM-CONNECTED mode. */
@@ -2032,17 +2048,7 @@ int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
case GSM48_MT_GMM_PTMSI_REALL_COMPL:
if (!mmctx)
goto null_mmctx;
- LOGMMCTXP(LOGL_INFO, mmctx, "-> PTMSI REALLOCATION COMPLETE\n");
- mmctx_timer_stop(mmctx, 3350);
- mmctx->t3350_mode = GMM_T3350_MODE_NONE;
- mmctx->p_tmsi_old = 0;
- mmctx->pending_req = 0;
- if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) {
- /* Unassign the old TLLI */
- mmctx->gb.tlli = mmctx->gb.tlli_new;
- //gprs_llgmm_assign(mmctx->gb.llme, TLLI_UNASSIGNED, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL);
- }
- rc = 0;
+ rc = gsm48_rx_gmm_ptmsi_reall_compl(mmctx);
break;
case GSM48_MT_GMM_AUTH_CIPH_RESP:
if (!mmctx)