aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/gprs_llc.c
diff options
context:
space:
mode:
authorJonathan Santos <jrsantos@jonathanrsantos.com>2011-06-22 12:13:59 -0400
committerJonathan Santos <jrsantos@jonathanrsantos.com>2011-07-21 15:30:41 -0400
commite5b7ad8119837f68b3bc1e53beb8f03deff21938 (patch)
tree2d4944d9747d5ad82fe6a2d386d2dc0e0bd4b94e /src/gprs/gprs_llc.c
parent5f7d3cd6d2c2790c186a6d83286b6f9ee68e5f71 (diff)
gprs: Reset LLC state when Timer 3350 expires
This works around a problem that occurs if a mobile loses packet data connectivity, e.g. moves out of coverage or switches over to a circuit-switched call, while a data transfer is occurring. The mobile would reset its LLC state, causing it to be unsynchronized with the SGSN. Therefore the SGSN would drop incoming frames until the sequence numbers matched. This workaround resets the LLC state in the SGSN if T3350 expires, indicating that Routing Area Updating Request, Attach Request, or P-TMSI Realloc Command has failed.
Diffstat (limited to 'src/gprs/gprs_llc.c')
-rw-r--r--src/gprs/gprs_llc.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gprs/gprs_llc.c b/src/gprs/gprs_llc.c
index 07294aadc..c5ff72944 100644
--- a/src/gprs/gprs_llc.c
+++ b/src/gprs/gprs_llc.c
@@ -868,6 +868,30 @@ int gprs_llgmm_resume(struct gprs_llc_llme* llme)
return 0;
}
+void gprs_llgmm_reset_state(struct gprs_llc_llme *llme)
+{
+ unsigned int i;
+
+ if (llme == 0)
+ {
+ LOGP(DLLC, LOGL_ERROR, "LLC TX: trying to reset LLC states "
+ "but passed null llme by gmm\n");
+ return;
+ }
+
+ LOGP(DLLC, LOGL_NOTICE, "LLC RX: reset state variable for TLLI 0x%08x",
+ llme->tlli);
+ /* 8.5.3.1 For all LLE's */
+ for (i = 0; i < ARRAY_SIZE(llme->lle); i++) {
+ struct gprs_llc_lle *l = &llme->lle[i];
+ l->vu_recv = 0; /* lets not mess with send state variable now */
+ /* l->vu_send = l->vu_recv = 0; */
+ l->retrans_ctr = 0;
+ l->state = GPRS_LLES_ASSIGNED_ADM;
+ /* FIXME Set parameters according to table 9 */
+ }
+}
+
int gprs_llc_init(const char *cipher_plugin_path)
{
return gprs_cipher_load(cipher_plugin_path);