diff options
author | Jonathan Santos <jrsantos@jonathanrsantos.com> | 2011-06-10 17:25:48 -0400 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-10-16 21:36:26 +0200 |
commit | 30754ddfa952059c6539d3382a6920eff7e91c1e (patch) | |
tree | 8e52c97c2f831147ff47d1af3ae31c4cd7809984 /openbsc/src | |
parent | 6352889113c7b3424db1132ca9a521be6a10ed74 (diff) |
gprs: Suspend user data transmission during Routing Area Updating
TS 24.008 version 9.5.0 Release 9 sec 4.7.5:
In A/Gb mode, user data transmission in the MS shall be
suspended during the routing area updating procedure, except
if the routing area updating procedure is triggered by a PS
handover procedure as described in 3GPP TS 43.129 [113];
user data reception shall be possible. User data transmission
in the network may be suspended during the routing area
updating procedure.
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/gprs/gprs_gmm.c | 4 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_llc.c | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 471a66197..d1858e9e5 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -967,6 +967,8 @@ static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, return gsm48_tx_gmm_ra_upd_rej(msg, GMM_CAUSE_MS_ID_NOT_DERIVED); } + gprs_llgmm_suspend(mmctx->llme); + /* Store new BVCI/NSEI in MM context (FIXME: delay until we ack?) */ msgid2mmctx(mmctx, msg); /* Bump the statistics of received signalling msgs for this MM context */ @@ -1075,6 +1077,7 @@ static int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg, mmctx->tlli = mmctx->tlli_new; gprs_llgmm_assign(mmctx->llme, 0xffffffff, mmctx->tlli_new, GPRS_ALGO_GEA0, NULL); + gprs_llgmm_resume(mmctx->llme); rc = 0; break; case GSM48_MT_GMM_PTMSI_REALL_COMPL: @@ -1109,6 +1112,7 @@ static void mmctx_timer_cb(void *_mm) case 3350: /* waiting for ATTACH COMPLETE */ if (mm->num_T_exp >= 5) { LOGP(DMM, LOGL_NOTICE, "T3350 expired >= 5 times\n"); + gprs_llgmm_resume(mm->llme); break; } /* re-transmit the respective msg and re-start timer */ diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 8e13c6157..be2e92a9c 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -352,6 +352,12 @@ int gprs_llc_tx_ui(struct msgb *msg, uint8_t sapi, int command, return -EFBIG; } + if ((sapi != GPRS_SAPI_GMM) && lle->llme->suspended) { + LOGP(DLLC, LOGL_DEBUG, "LLC TX: suspended TLLI 0x08x, " + "dropping UI frame\n", msgb_tlli(msg)); + return 0; + } + /* Update LLE's (BVCI, NSEI) tuple */ lle->llme->bvci = msgb_bvci(msg); lle->llme->nsei = msgb_nsei(msg); @@ -902,6 +908,18 @@ int gprs_llgmm_reset(struct gprs_llc_llme *llme) return gprs_llc_tx_xid(&llme->lle[1], msg, 1); } +int gprs_llgmm_suspend(struct gprs_llc_llme* llme) +{ + llme->suspended = 1; + return 0; +} + +int gprs_llgmm_resume(struct gprs_llc_llme* llme) +{ + llme->suspended = 0; + return 0; +} + int gprs_llc_init(const char *cipher_plugin_path) { return gprs_cipher_load(cipher_plugin_path); |