aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2014-08-15 16:52:09 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2014-09-10 19:04:46 +0200
commite481815583d9f7b93e9e0d76b1e29b5444f4a732 (patch)
tree9da32053ed65d759ee689f4f8ccbc7ea7cc0641f /src/tbf.h
parent08e57c836699d3e509ad2c9539ac3b70f9df09e4 (diff)
tbf,bts: Keep track of new TBF for dl/ul assignment in m_new_tbf
There are a couple of possibilities where one TBF is used to assign a new one: 1. Assign a DL TBF from a UL TBF 2. Assign a UL TBF from a DL TBF 3. Assign a DL TBF from a DL TBF which is in wait-release state (T3193 is running) In these cases the assignment is sent on the existing TBF and triggers the assignement of the new TBF (with different TFI/direction). The current code detects these situations by looking at dl/ul_ass_state and then chosing the TBF with the opposite direction (DL/UL) that has the same TLLI. This does not work in the case 3 above where a new DL TBF is triggered for a DL TBF. The current code reuses the old TBF (and TFI), but this violates the spec. This patch introduces a m_new_tbf member which is set to the new TBF to be assigned. When receiving a control ack the code looks up the n_new_tbf member of the tbf that requested the control ack and completes the ul/dl assignment. If the old TBF was in the wait release state (T3193 is running) it is released. From 3GPP TS 04.60 9.3.2.6: """ If the network has received the PACKET DOWNLINK ACK/NACK message with the Final Ack Indicator bit set to '1' and has new data to transmit for the mobile station, the network may establish a new downlink TBF for the mobile station by sending the PACKET DOWNLINK ASSIGNMENT or PACKET TIMESLOT RECONFIGURE message with the Control Ack bit set to '1' on PACCH. In case the network establishes a new downlink TBF for the mobile station, the network shall stop timer T3193. """ reuse_tbf() is modified to allocate a new TBF with a new TFI and trigger a dl assignment for that TBF on the old TBF. All pending data is moved to the new TBF. Ticket: SYS#382 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tbf.h b/src/tbf.h
index c0f976d4..69f1f053 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -142,6 +142,9 @@ struct gprs_rlcmac_tbf {
const char *imsi() const;
void assign_imsi(const char *imsi);
+ void set_new_tbf(gprs_rlcmac_tbf *tbf);
+ gprs_rlcmac_tbf *new_tbf() const;
+
time_t created_ts() const;
/* attempt to make things a bit more fair */
@@ -165,6 +168,8 @@ struct gprs_rlcmac_tbf {
enum gprs_rlcmac_tbf_ul_ass_state ul_ass_state;
enum gprs_rlcmac_tbf_ul_ack_state ul_ack_state;
+ gprs_rlcmac_tbf *m_new_tbf;
+
enum gprs_rlcmac_tbf_poll_state poll_state;
uint32_t poll_fn; /* frame number to poll */
@@ -289,6 +294,11 @@ inline const char *gprs_rlcmac_tbf::imsi() const
return m_imsi;
}
+inline gprs_rlcmac_tbf *gprs_rlcmac_tbf::new_tbf() const
+{
+ return m_new_tbf;
+}
+
inline time_t gprs_rlcmac_tbf::created_ts() const
{
return m_created_ts;