aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-09-01 11:38:40 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-09-01 12:01:20 +0200
commitc8cbfc2c9800929a46ffa71e3bd0f34aa9b42f33 (patch)
tree71e435baa88eb4d786c89a3a157892894c5b2fdf /src
parentae0a799f4472a75912b444cc2f09361aaea27963 (diff)
bts: Start a DL TBF if needed after establishment of an UL TBF
Currently an existing DL TBF can get lost in the process of establishing an UL TBF via RACH. This can lead to stalled connections until the network sends more LLC frames. This commit adds a check for a non-empty LLC queue after the UL TBF has been established to rcv_control_ack (GPRS_RLCMAC_UL_ASS_WAIT_ACK path) to eventually establish a new DL TBF on the UL TBF's PACCH. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/bts.cpp6
-rw-r--r--src/gprs_ms.h9
2 files changed, 15 insertions, 0 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 6528915..39737f4 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -834,6 +834,12 @@ void gprs_rlcmac_pdch::rcv_control_ack(Packet_Control_Acknowledgement_t *packet,
"assignment for UL %s\n", tbf_name(new_tbf));
}
tbf_assign_control_ts(new_tbf);
+ /* there might be LLC packets waiting in the queue, but the DL
+ * TBF might have been released while the UL TBF has been
+ * established */
+ if (new_tbf->ms()->need_dl_tbf())
+ new_tbf->establish_dl_tbf_on_pacch();
+
return;
}
LOGP(DRLCMAC, LOGL_ERROR, "Error: received PACET CONTROL ACK "
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index 1f080ff..e820e19 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -110,6 +110,7 @@ public:
void update_error_rate(gprs_rlcmac_tbf *tbf, int percent);
bool is_idle() const;
+ bool need_dl_tbf() const;
void* operator new(size_t num);
void operator delete(void* p);
@@ -175,6 +176,14 @@ inline bool GprsMs::is_idle() const
return !m_ul_tbf && !m_dl_tbf && !m_ref && llist_empty(&m_old_tbfs);
}
+inline bool GprsMs::need_dl_tbf() const
+{
+ if (dl_tbf() != NULL && dl_tbf()->state_is_not(GPRS_RLCMAC_WAIT_RELEASE))
+ return false;
+
+ return llc_queue()->size() > 0;
+}
+
inline uint32_t GprsMs::tlli() const
{
return m_new_ul_tlli ? m_new_ul_tlli :