aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-14 11:43:04 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-16 19:37:08 +0100
commitd87e1d6ab747423d3668c74d16201a5d967accf0 (patch)
tree6b37bcee7b3e4f0f9d2069cc12321887e971559b /src
parent61679251472391bf1746eb277b5027caa1ac14ad (diff)
rlc: Do not raise_v_q in receive_bsn
Currently gprs_rlc_ul_window::receive_bsn calls raise_v_q and returns the number of RLC data blocks that can be taken from the queue. This does not fit the EGPRS feature to put 2 independant data blocks in a single RLC block. This commit removes raise_v_q from receive_bsn, hence it must be called explicitely to get the number of processable data blocks. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/rlc.cpp3
-rw-r--r--src/rlc.h2
-rw-r--r--src/tbf_ul.cpp3
3 files changed, 4 insertions, 4 deletions
diff --git a/src/rlc.cpp b/src/rlc.cpp
index 9f5c61d9..bafc56e7 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -220,10 +220,9 @@ uint16_t gprs_rlc_ul_window::raise_v_q()
return count;
}
-uint16_t gprs_rlc_ul_window::receive_bsn(const uint16_t bsn)
+void gprs_rlc_ul_window::receive_bsn(const uint16_t bsn)
{
m_v_n.mark_received(bsn);
raise_v_r(bsn);
- return raise_v_q();
}
diff --git a/src/rlc.h b/src/rlc.h
index bafe6a88..081ba40e 100644
--- a/src/rlc.h
+++ b/src/rlc.h
@@ -202,7 +202,7 @@ struct gprs_rlc_ul_window {
void raise_v_q(int);
- uint16_t receive_bsn(const uint16_t bsn);
+ void receive_bsn(const uint16_t bsn);
uint16_t m_v_r; /* receive state */
uint16_t m_v_q; /* receive window state */
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index aa81b538..4a5f21f5 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -332,7 +332,8 @@ int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged_gprs(const uint8_t *data,
* the window is empty.*/
const uint16_t v_q_beg = m_window.v_q();
- const uint16_t count = m_window.receive_bsn(rh->bsn);
+ m_window.receive_bsn(rh->bsn);
+ const uint16_t count = m_window.raise_v_q();
/* Retrieve LLC frames from blocks that are ready */
for (uint16_t i = 0; i < count; ++i) {