aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-13 20:10:12 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-13 20:17:06 +0100
commite5dc2a0ac5ceae75b7c876665d810f72f810139d (patch)
tree68fd11686f4dd1996960ab3773015282a07d6145
parent796270bf83d593e23e92d0ca50bfd29692e43b2e (diff)
rlc: Pass the gprs_rlc_data to the assemble function for assembly
-rw-r--r--src/tbf.cpp8
-rw-r--r--src/tbf.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index d4aaca0..14e6e2a 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -708,9 +708,11 @@ struct msgb *gprs_rlcmac_tbf::llc_dequeue(bssgp_bvc_ctx *bctx)
* Store received block data in LLC message(s) and forward to SGSN
* if complete.
*/
-int gprs_rlcmac_tbf::assemble_forward_llc(uint8_t *data, uint8_t len)
+int gprs_rlcmac_tbf::assemble_forward_llc(const gprs_rlc_data *_data)
{
- struct rlc_ul_header *rh = (struct rlc_ul_header *)data;
+ const uint8_t *data = _data->block;
+ uint8_t len = _data->len;
+ const struct rlc_ul_header *rh = (const struct rlc_ul_header *) data;
uint8_t e, m;
struct rlc_li_field *li;
uint8_t frame_offset[16], offset = 0, chunk;
@@ -1731,7 +1733,7 @@ int gprs_rlcmac_tbf::rcv_data_block_acknowledged(const uint8_t *data, size_t len
"V(Q) to %d\n", this->dir.ul.v_q,
(this->dir.ul.v_q + 1) & mod_sns);
/* get LLC data from block */
- this->assemble_forward_llc(m_rlc.blocks[index].block, m_rlc.blocks[index].len);
+ this->assemble_forward_llc(&m_rlc.blocks[index]);
/* raise V(Q), because block already received */
this->dir.ul.v_q = (this->dir.ul.v_q + 1) & mod_sns;
}
diff --git a/src/tbf.h b/src/tbf.h
index 3d6a583..bf5f32d 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -113,7 +113,7 @@ struct gprs_rlcmac_tbf {
struct msgb *llc_dequeue(bssgp_bvc_ctx *bctx);
/* TODO: extract LLC class? */
- int assemble_forward_llc(uint8_t *data, uint8_t len);
+ int assemble_forward_llc(const gprs_rlc_data *data);
struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts);
struct msgb *create_dl_ass(uint32_t fn);