diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-01-11 09:58:11 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-05 13:26:33 +0100 |
commit | fc1b3e6c9076ddc38e07715b2cc30319bac19b9c (patch) | |
tree | b7d6086f12afc017750e358ed68977c7519fc8d7 /src/tbf_dl.cpp | |
parent | f2ba4cbf51ba5ec4183a9153ba2ce51df9050881 (diff) |
edge: Fix RLC message size
Currently the RLC message length that is obtained from the DSP is
reduced by 1 if the last byte of the buffer includes spare bits.
While this worked well with GPRS, these bits are being used to
encode RLC blocks in EGPRS mode. Thus this last byte must not be
chopped off. The functionality of the code is not affected by this,
since the modified length value is not used.
This commit adds GprsCodingScheme::usedSizeDL/UL to return
the number of bytes needed to encode the message block. If there are
single bits at the end that are to be used (EGPRS), the functions
return the number of full bytes plus 1 (which is the buffer size
reported by the DSP and returned by sizeUL/sizeDL). The commit also
removes the len parameter from rcv_data_block_acknowledged.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf_dl.cpp')
-rw-r--r-- | src/tbf_dl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 73d8a3bc..ac1c253f 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -441,7 +441,7 @@ struct msgb *gprs_rlcmac_dl_tbf::create_new_bsn(const uint32_t fn, const uint8_t /* total length of block, including spare bits */ const uint8_t block_length = cs.sizeDL(); - /* length of usable data of block, w/o spare bits, inc. MAC */ + /* length of usable data of block, w/o spare bits (GPRS), inc. MAC */ const uint8_t block_data_len = cs.maxBytesDL(); /* now we still have untransmitted LLC data, so we fill mac block */ |