aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-01-23 11:44:39 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-26 08:42:43 +0100
commit8de9c48c997a84f1afbfd3306435403bdbfd9f6a (patch)
tree7728091edb57360a93d3f8c9760b7f0af8f4ff21 /openbsc
parent79af67d7c02a25e36146369b60f7f25c9655c862 (diff)
gprs: Add 'Negotiated READY timer value' IE to Attach/RAU Accept
Currently this optional IE is omitted, so that the optional 'Requested READY timer value' of the corresponding Request message is used by the MS (or the default value if this IE is not used). This patch extends gsm48_tx_gmm_att_ack and gsm48_tx_gmm_ra_upd_ack to always include the IE set to the default value of T3312 (44s, see GSM 04.08, table 11.4a). Ticket: OW#1364 Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/gprs/gprs_gmm.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 32fb8e49d..72239e0bf 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -50,6 +50,7 @@
#include <openbsc/gprs_llc.h>
#include <openbsc/gprs_sgsn.h>
#include <openbsc/gprs_gmm.h>
+#include <openbsc/gprs_utils.h>
#include <openbsc/sgsn.h>
#include <pdp.h>
@@ -64,7 +65,7 @@
/* Section 11.2.2 / Table 11.4a MM timers netwokr side */
#define GSM0408_T3313_SECS 30 /* waiting for paging response */
-#define GSM0408_T3314_SECS 44 /* force to STBY on expiry */
+#define GSM0408_T3314_SECS 44 /* force to STBY on expiry, Ready timer */
#define GSM0408_T3316_SECS 44
/* Section 11.3 / Table 11.2d Timers of Session Management - network side */
@@ -338,8 +339,13 @@ static int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm)
ptsig[1] = mm->p_tmsi_sig >> 8;
ptsig[2] = mm->p_tmsi_sig & 0xff;
- /* Optional: Negotiated Ready timer value */
#endif
+ /* Optional: Negotiated Ready timer value
+ * (fixed 44s, default value, GSM 04.08, table 11.4a) to safely limit
+ * the inactivity time READY->STANDBY.
+ */
+ msgb_tv_put(msg, GSM48_IE_GMM_TIMER_READY,
+ gprs_secs_to_tmr_floor(GSM0408_T3314_SECS));
#ifdef PTMSI_ALLOC
/* Optional: Allocated P-TMSI */
@@ -992,6 +998,10 @@ static int gsm48_tx_gmm_ra_upd_ack(struct sgsn_mm_ctx *mm)
mid[0] = GSM48_IE_GMM_ALLOC_PTMSI;
#endif
+ /* Optional: Negotiated READY timer value */
+ msgb_tv_put(msg, GSM48_IE_GMM_TIMER_READY,
+ gprs_secs_to_tmr_floor(GSM0408_T3314_SECS));
+
/* Option: MS ID, ... */
return gsm48_gmm_sendmsg(msg, 0, mm);
}