aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.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/bts.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/bts.cpp')
-rw-r--r--src/bts.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 9e8a6c8..867658e 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -996,6 +996,10 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet,
ms->dl_tbf() ? ms->dl_tbf()->state_name() : "None");
return;
}
+
+ /* Reset N3101 counter: */
+ tbf->m_n3101 = 0;
+
tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
LOGPTBF(tbf, LOGL_DEBUG, "RX: [PCU <- BTS] Packet Control Ack\n");
@@ -1185,6 +1189,9 @@ void gprs_rlcmac_pdch::rcv_control_dl_ack_nack(Packet_Downlink_Ack_Nack_t *ack_n
return;
}
+ /* Reset N3101 counter: */
+ tbf->m_n3101 = 0;
+
if (tbf->handle_ack_nack())
LOGPTBF(tbf, LOGL_NOTICE, "Recovered downlink ack\n");
@@ -1249,6 +1256,9 @@ void gprs_rlcmac_pdch::rcv_control_egprs_dl_ack_nack(EGPRS_PD_AckNack_t *ack_nac
return;
}
+ /* Reset N3101 counter: */
+ tbf->m_n3101 = 0;
+
if (tbf->handle_ack_nack())
LOGPTBF(tbf, LOGL_NOTICE, "Recovered EGPRS downlink ack\n");
@@ -1417,6 +1427,9 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
}
LOGPTBFDL(dl_tbf, LOGL_ERROR,
"RX: [PCU <- BTS] FIXME: Packet resource request\n");
+
+ /* Reset N3101 counter: */
+ dl_tbf->m_n3101 = 0;
} else {
struct gprs_rlcmac_ul_tbf *ul_tbf;
int8_t tfi = request->ID.u.Global_TFI.u.UPLINK_TFI;
@@ -1427,6 +1440,9 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
}
LOGPTBFUL(ul_tbf, LOGL_ERROR,
"RX: [PCU <- BTS] %s FIXME: Packet resource request\n");
+
+ /* Reset N3101 counter: */
+ ul_tbf->m_n3101 = 0;
}
}
@@ -1579,6 +1595,9 @@ int gprs_rlcmac_pdch::rcv_data_block(uint8_t *data, uint8_t data_len, uint32_t f
return 0;
}
+ /* Reset N3101 counter: */
+ tbf->m_n3101 = 0;
+
return tbf->rcv_data_block_acknowledged(&rlc_dec, data, meas);
}