aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.cpp
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-12-20 18:01:55 +0100
committerMax <msuraev@sysmocom.de>2017-12-20 18:01:55 +0100
commit59e4a4fee11a966d2c72209a0e23087e20d5103d (patch)
tree780e30b8edd7e5a1c7cbe406a449a55096b2d71a /src/tbf.cpp
parentee5be3a0095b4bae430032d35e3ad0716eff34ab (diff)
TBF: add N3101 counter
Properly reset the counter when receiving valid RLCMAC block and update it when no data is received as per 3GPP TS 44.060 ยง8.1.1.1 Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682 Fixes: OS#2407
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r--src/tbf.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index a5eedd93..dc0777f6 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -177,6 +177,7 @@ gprs_rlcmac_tbf::gprs_rlcmac_tbf(BTS *bts_, gprs_rlcmac_tbf_direction dir) :
was_releasing(0),
upgrade_to_multislot(0),
bts(bts_),
+ m_n3101(0),
m_tfi(0),
m_created_ts(0),
m_ctrs(NULL),
@@ -740,6 +741,14 @@ void gprs_rlcmac_tbf::poll_timeout()
poll_state = GPRS_RLCMAC_POLL_NONE;
+ m_n3101++;
+ if (m_n3101 == bts->bts_data()->n3101) {
+ LOGP(DRLCMAC, LOGL_NOTICE, " N3101 exceeded MAX (%u)\n", bts->bts_data()->n3101);
+ set_state(GPRS_RLCMAC_RELEASING);
+ t_start(T3169, bts->bts_data()->t3169, 0, "MAX N3101 reached", false);
+ return;
+ }
+
if (ul_tbf && ul_tbf->handle_ctrl_ack()) {
if (!ul_tbf->ctrl_ack_to_toggle()) {
LOGP(DRLCMAC, LOGL_NOTICE, "- Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ACK\n");