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
This commit is contained in:
Jacob Erlbeck 2015-01-23 11:44:39 +01:00 committed by Holger Hans Peter Freyther
parent 79af67d7c0
commit 8de9c48c99
1 changed files with 12 additions and 2 deletions

View File

@ -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);
}