diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-13 19:51:55 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-13 19:51:55 +0100 |
commit | 9241fd0957d44d2b60b74afd9022b01a1ea110ba (patch) | |
tree | 89e09b04248c289a91d1bfa285c1d69334e24d8c /src/tbf.cpp | |
parent | e9429b5d3ecb3176eaee45352d9b7d1d57fed1c5 (diff) |
rlc: Begin to move the rlc block handling into a separate object
The secret of gprs_rlc will be the manipulation of the blocks for
the current window. We might add the window handling in this class
as well.
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r-- | src/tbf.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index 909f2a6f..54bc5391 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -964,7 +964,7 @@ do_resend: /* now we still have untransmitted LLC data, so we fill mac block */ index = dir.dl.v_s & mod_sns_half; - data = rlc_block[index]; + data = m_rlc.block[index]; #warning "Selection of the CS doesn't belong here" if (cs == 0) { cs = bts_data()->initial_cs_dl; @@ -1102,8 +1102,8 @@ do_resend: break; } LOGP(DRLCMACDL, LOGL_DEBUG, "data block: %s\n", - osmo_hexdump(rlc_block[index], block_length)); - rlc_block_len[index] = block_length; + osmo_hexdump(m_rlc.block[index], block_length)); + m_rlc.block_len[index] = block_length; /* raise send state and set ack state array */ dir.dl.v_b[index] = 'U'; /* unacked */ dir.dl.v_s = (dir.dl.v_s + 1) & mod_sns; /* inc send state */ @@ -1121,8 +1121,8 @@ struct msgb *gprs_rlcmac_tbf::create_dl_acked_block( uint8_t len; /* get data and header from current block */ - data = rlc_block[index]; - len = rlc_block_len[index]; + data = m_rlc.block[index]; + len = m_rlc.block_len[index]; rh = (struct rlc_dl_header *)data; /* Clear Polling, if still set in history buffer */ @@ -1701,8 +1701,8 @@ int gprs_rlcmac_tbf::rcv_data_block_acknowledged(const uint8_t *data, size_t len } /* Write block to buffer and set receive state array. */ index = rh->bsn & mod_sns_half; /* memory index of block */ - memcpy(this->rlc_block[index], data, len); /* Copy block. */ - this->rlc_block_len[index] = len; + memcpy(m_rlc.block[index], data, len); /* Copy block. */ + m_rlc.block_len[index] = len; this->dir.ul.v_n[index] = 'R'; /* Mark received block. */ LOGP(DRLCMACUL, LOGL_DEBUG, "- BSN %d storing in window (%d..%d)\n", rh->bsn, this->dir.ul.v_q, @@ -1731,7 +1731,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(this->rlc_block[index], this->rlc_block_len[index]); + this->assemble_forward_llc(m_rlc.block[index], m_rlc.block_len[index]); /* raise V(Q), because block already received */ this->dir.ul.v_q = (this->dir.ul.v_q + 1) & mod_sns; } @@ -1740,7 +1740,7 @@ int gprs_rlcmac_tbf::rcv_data_block_acknowledged(const uint8_t *data, size_t len if (this->state_is(GPRS_RLCMAC_FLOW) /* still in flow state */ && this->dir.ul.v_q == this->dir.ul.v_r) { /* if complete */ struct rlc_ul_header *last_rh = (struct rlc_ul_header *) - this->rlc_block[(this->dir.ul.v_r - 1) & mod_sns_half]; + m_rlc.block[(this->dir.ul.v_r - 1) & mod_sns_half]; LOGP(DRLCMACUL, LOGL_DEBUG, "- No gaps in received block, " "last block: BSN=%d CV=%d\n", last_rh->bsn, last_rh->cv); |