aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-05 22:53:24 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-09 23:09:59 +0100
commitcd527dc445fef28200655d9debf719b5dc778937 (patch)
treeb7773eab9c2382f565bdb82fbb1f05dad87fd304
parentf6dda6ce98c5ab7e4921e080b314875e207f6190 (diff)
tbf: Start timer when sending an immediate assigment (TODO)
Currently a timer is only started, when the confirmation is received. Start a timer, when the assignment is sent. The timer is named T3141 (see TS 44.108, 3.5.2.1.3.1) but this might not be the correct timer name, since TS 44.018 says, that T3141 is started, when the IMM.ASS is sent to the MS. Here it is assumed, that this is the time the request is passed to the BTS. The values are 10s for PCH and 5s for AGCH. TODO: - check the timeouts, sthey should be above the maximum BTS queuing time. Sponsored-by: On-Waves ehf
-rw-r--r--src/bts.cpp9
-rw-r--r--src/tbf.cpp7
-rw-r--r--src/tbf.h8
3 files changed, 22 insertions, 2 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index f7b3f184..41f1cc82 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -546,8 +546,11 @@ int BTS::rcv_rach(uint8_t ra, uint32_t Fn, int16_t qta)
m_bts.trx[trx_no].arfcn, ts_no, tsc, usf, 0, sb_fn,
m_bts.alpha, m_bts.gamma, -1);
- if (plen >= 0)
+ if (plen >= 0) {
pcu_l1if_tx_agch(immediate_assignment, plen);
+ if (tbf)
+ tbf_timer_start(tbf, 3141, T3141_agch);
+ }
bitvec_free(immediate_assignment);
@@ -605,8 +608,10 @@ void BTS::snd_dl_ass(gprs_rlcmac_tbf *tbf, uint8_t poll, const char *imsi)
(tbf->pdch[ts]->last_rts_fn + 21216) % 2715648, tbf->ta(),
tbf->trx->arfcn, ts, tbf->tsc(), 7, poll,
tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1);
- if (plen >= 0)
+ if (plen >= 0) {
pcu_l1if_tx_pch(immediate_assignment, plen, imsi);
+ tbf_timer_start(tbf, 3141, T3141_pch);
+ }
bitvec_free(immediate_assignment);
}
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 69b9e3a0..bd868885 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -881,6 +881,13 @@ void gprs_rlcmac_tbf::handle_timeout()
tbf_free(this);
return;
break;
+ case 3141:
+ LOGP(DRLCMAC, LOGL_NOTICE, "%s T%d timeout after "
+ "requesting an immediate assignment\n", tbf_name(this), T);
+ rlcmac_diag();
+ /* free TBF */
+ tbf_free(this);
+ return;
default:
LOGP(DRLCMAC, LOGL_ERROR,
"%s timer expired in unknown mode: %u\n", tbf_name(this), T);
diff --git a/src/tbf.h b/src/tbf.h
index 41a7e20a..dbb29783 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -38,6 +38,14 @@ class GprsMs;
* TBF instance
*/
+/*
+ * TODO: T3141 might not be the correct timer name, since TS 44.018 says, that
+ * T3141 is started, when the IMM.ASS is sent to the MS. Here it is assumed,
+ * that this is the time the request is passed to the BTS. Make these values
+ * configurable.
+ */
+#define T3141_pch 10,0 /* waiting after queuing IMM.ASS to PCH */
+#define T3141_agch 5,0 /* waiting after queuing IMM.ASS to AGCH */
#define Tassign_agch 0,200000 /* waiting after IMM.ASS confirm */
#define Tassign_pacch 2,0 /* timeout for pacch assigment */