diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-01-14 15:28:38 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-02 17:06:33 +0100 |
commit | 85d07dd568015e1a7cb6aec86770818a47e5f879 (patch) | |
tree | cfb68873c5e44e45e97e24ebee46f22a0cd02953 /src/decoding.cpp | |
parent | 4210e9c53c66b3cdb11b6c25f3d80804ae50ecda (diff) |
WIP: fix Decoding::decode_gprs_acknack_bits
Only return bits starting with V(A).
Ticket: OW#????
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/decoding.cpp')
-rw-r--r-- | src/decoding.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/decoding.cpp b/src/decoding.cpp index e2e22321..e2202ed1 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -564,13 +564,15 @@ int Decoding::decode_gprs_acknack_bits(const Ack_Nack_Description_t *desc, num_blocks = urbb_len; *bsn_end = desc->STARTING_SEQUENCE_NUMBER; - *bsn_begin = window->mod_sns(*bsn_end - RLC_GPRS_WS); + *bsn_begin = window->v_a(); + + num_blocks = *bsn_end - *bsn_begin; urbb.cur_bit = 0; urbb.data = (uint8_t *)desc->RECEIVED_BLOCK_BITMAP; urbb.data_len = sizeof(desc->RECEIVED_BLOCK_BITMAP); - for (int i = urbb_len; i > 0; i--) { + for (int i = urbb_len; i > urbb_len - num_blocks; i--) { /* Set bit at the appropriate position (see 3GPP TS 44.060 12.3) */ int is_ack = bitvec_get_bit_pos(&urbb, i-1); bitvec_set_bit(bits, is_ack == 1 ? ONE : ZERO); |