aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-09-25 19:53:52 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-25 19:53:57 +0200
commitce6a43f78408eaa404b835cb632108737a3a2315 (patch)
tree05c8f9cb9dacc70fce9205857f55955bac52cc2c
parent9d1cdb1f697057033394590a9b2815efe6c08cd9 (diff)
WIP: Implement T3141pespin/t3141
-rw-r--r--src/bts.cpp4
-rw-r--r--src/pdch.cpp1
-rw-r--r--src/tbf.cpp6
-rw-r--r--src/tbf.h5
4 files changed, 12 insertions, 4 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index df58494..4a05f63 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -81,9 +81,9 @@ static struct osmo_tdef T_defs_pcu[] = {
{ .T=1, .default_val=30, .unit=OSMO_TDEF_S, .desc="BSSGP (un)blocking procedures timer (s)", .val=0 },
{ .T=2, .default_val=30, .unit=OSMO_TDEF_S, .desc="BSSGP reset procedure timer (s)", .val=0 },
{ .T=3190, .default_val=5, .unit=OSMO_TDEF_S, .desc="Return to packet idle mode after Packet DL Assignment on CCCH (s)", .val=0},
+ { .T=3141, .default_val=200, .unit=OSMO_TDEF_MS, .desc="Time to wait after IMM.ASS confirm until contention resolution procedure times out (ms)", .val=0 },
{ .T=-2000, .default_val=2, .unit=OSMO_TDEF_MS, .desc="Tbf reject for PRR timer (ms)", .val=0 },
{ .T=-2001, .default_val=2, .unit=OSMO_TDEF_S, .desc="PACCH assignment timer (s)", .val=0 },
- { .T=-2002, .default_val=200, .unit=OSMO_TDEF_MS, .desc="Waiting after IMM.ASS confirm timer (ms)", .val=0 },
{ .T=-2030, .default_val=60, .unit=OSMO_TDEF_S, .desc="Time to keep an idle MS object alive (s)", .val=0 }, /* slightly above T3314 (default 44s, 24.008, 11.2.2) */
{ .T=-2031, .default_val=2000, .unit=OSMO_TDEF_MS, .desc="Time to keep an idle DL TBF alive (ms)", .val=0 },
{ .T=0, .default_val=0, .unit=OSMO_TDEF_S, .desc=NULL, .val=0 } /* empty item at the end */
@@ -601,7 +601,7 @@ int BTS::rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn)
LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli);
if (dl_tbf->m_wait_confirm)
- T_START(dl_tbf, T0, -2002, "assignment (AGCH)", true);
+ T_START(dl_tbf, T3141, 3141, "assignment (AGCH)", true);
return 0;
}
diff --git a/src/pdch.cpp b/src/pdch.cpp
index e4b25e1..17763a2 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -335,6 +335,7 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet,
TBF_SET_STATE(new_tbf, GPRS_RLCMAC_FLOW);
/* stop pending assignment timer */
new_tbf->t_stop(T0, "control acked (DL-TBF)");
+ /* TODO: stop T3141 here? */
if (new_tbf->check_n_clear(GPRS_RLCMAC_FLAG_TO_DL_ASS))
LOGPTBF(new_tbf, LOGL_NOTICE, "Recovered downlink assignment\n");
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 3ca39bf..2223caa 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -630,7 +630,7 @@ bool gprs_rlcmac_tbf::timers_pending(enum tbf_timers t)
return osmo_timer_pending(&Tarr[t]);
/* we don't start with T0 because it's internal timer which requires special handling */
- for (i = T3169; i < T_MAX; i++)
+ for (i = T3141; i < T_MAX; i++)
if (osmo_timer_pending(&Tarr[i]))
return true;
@@ -658,6 +658,7 @@ static inline void tbf_timeout_free(struct gprs_rlcmac_tbf *tbf, enum tbf_timers
#define T_CBACK(t, diag) static void cb_##t(void *_tbf) { tbf_timeout_free((struct gprs_rlcmac_tbf *)_tbf, t, diag); }
+T_CBACK(T3141, true)
T_CBACK(T3169, true)
T_CBACK(T3191, true)
T_CBACK(T3193, false)
@@ -707,6 +708,9 @@ void gprs_rlcmac_tbf::t_start(enum tbf_timers t, int T, const char *reason, bool
case T0:
Tarr[t].cb = tbf_timer_cb;
break;
+ case T3141:
+ Tarr[t].cb = cb_T3141;
+ break;
case T3169:
Tarr[t].cb = cb_T3169;
break;
diff --git a/src/tbf.h b/src/tbf.h
index fd65b20..b1d1aec 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -121,9 +121,12 @@ enum tbf_egprs_counters {
#define LOGPTBF(tbf, level, fmt, args...) LOGP(DTBF, level, "%s " fmt, tbf_name(tbf), ## args)
enum tbf_timers {
- /* internal assign/reject timer */
+ /* internal PACCH assign/reject timer */
T0,
+ /* Time to wait after IMM.ASS confirm until contention resolution procedure times out. */
+ T3141,
+
/* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */
T3169,