aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-28 19:07:01 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-08 09:38:44 +0200
commit489a2b35d87610fb077a51de696555a54e5fb247 (patch)
tree6986b156cbb3f1a7a01b211e919a25d2c39edea6 /src/tbf.cpp
parent10ed79553a8e7241b69c4155325c29105c7a606d (diff)
tbf: Move the LLC queue to GprsMs
Currently the enqueued DL LLC messages which have not yet passed to RLC/MAC encoding are eventually copied from one TBF to the next one (see gprs_rlcmac_dl_tbf::reuse_tbf). Since the enqueued LLC messages are related to a specific MS, they should be stored at that layer. This commit moves the gprs_llc_queue object to GprsMs and changes the TBF's accessor methods accordingly. The LLC copying code is removed from gprs_rlcmac_dl_tbf::reuse_tbf(). Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r--src/tbf.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index dc26cc70..136226cb 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -102,6 +102,16 @@ void gprs_rlcmac_tbf::set_ta(uint8_t ta)
m_ta = ta;
}
+gprs_llc_queue *gprs_rlcmac_tbf::llc_queue()
+{
+ return m_ms ? m_ms->llc_queue() : NULL;
+}
+
+const gprs_llc_queue *gprs_rlcmac_tbf::llc_queue() const
+{
+ return m_ms ? m_ms->llc_queue() : NULL;
+}
+
void gprs_rlcmac_tbf::set_ms(GprsMs *ms)
{
if (m_ms == ms)
@@ -219,7 +229,6 @@ void tbf_free(struct gprs_rlcmac_tbf *tbf)
tbf_name(tbf));
tbf->stop_timer();
#warning "TODO: Could/Should generate bssgp_tx_llc_discarded"
- tbf->llc_queue()->clear(tbf->bts);
tbf_unlink_pdch(tbf);
llist_del(&tbf->list.list);
@@ -451,7 +460,6 @@ static int setup_tbf(struct gprs_rlcmac_tbf *tbf, struct gprs_rlcmac_bts *bts,
gettimeofday(&tbf->meas.rssi_tv, NULL);
tbf->m_llc.init();
- tbf->llc_queue()->init();
return 0;
}