diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-05-28 19:07:01 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-06-08 09:38:44 +0200 |
commit | 489a2b35d87610fb077a51de696555a54e5fb247 (patch) | |
tree | 6986b156cbb3f1a7a01b211e919a25d2c39edea6 /src/tbf_dl.cpp | |
parent | 10ed79553a8e7241b69c4155325c29105c7a606d (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_dl.cpp')
-rw-r--r-- | src/tbf_dl.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 5b9c06ca..85cd7513 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -771,7 +771,6 @@ void gprs_rlcmac_dl_tbf::reuse_tbf(const uint8_t *data, const uint16_t len) uint8_t trx; struct gprs_rlcmac_dl_tbf *new_tbf = NULL; int8_t tfi; /* must be signed */ - struct msgb *msg; bts->tbf_reused(); @@ -790,13 +789,10 @@ void gprs_rlcmac_dl_tbf::reuse_tbf(const uint8_t *data, const uint16_t len) new_tbf->set_ms(ms()); - /* Copy over all data to the new TBF */ + /* Start with the passed frame */ new_tbf->m_llc.put_frame(data, len); bts->llc_frame_sched(); - while ((msg = llc_queue()->dequeue())) - new_tbf->llc_queue()->enqueue(msg); - /* reset rlc states */ m_tx_counter = 0; m_wait_confirm = 0; @@ -836,7 +832,8 @@ bool gprs_rlcmac_dl_tbf::need_control_ts() const bool gprs_rlcmac_dl_tbf::have_data() const { - return m_llc.chunk_size() > 0 || llc_queue()->size() > 0; + return m_llc.chunk_size() > 0 || + (llc_queue() && llc_queue()->size() > 0); } int gprs_rlcmac_dl_tbf::frames_since_last_poll(unsigned fn) const |