diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-24 20:36:36 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-26 21:00:51 +0100 |
commit | f1593b7c49bd54caae9326c79156741e6078c412 (patch) | |
tree | 25104f4c817acd77276df41ece87ee59ff203d54 /src/encoding.cpp | |
parent | ab6cd921e3e47481ecdab93d1df1ce7f14b72e0a (diff) |
tbf/rlc: Big change and move the window handling out to the rlc
The send and receive window is now managed by an external object.
There are some issues that can only be solved with C++11 but it
is progres and removes some of the spaghetti code. For GPRS the
sns and ws is hardcoded. Move that into the window code.
Diffstat (limited to 'src/encoding.cpp')
-rw-r--r-- | src/encoding.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/encoding.cpp b/src/encoding.cpp index 4855b226..b45657a4 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -381,9 +381,9 @@ void Encoding::write_packet_uplink_ack(struct gprs_rlcmac_bts *bts, block->u.Packet_Uplink_Ack_Nack.UnionType = 0x0; // PU_AckNack_GPRS = on block->u.Packet_Uplink_Ack_Nack.u.PU_AckNack_GPRS_Struct.CHANNEL_CODING_COMMAND = bts->initial_cs_ul - 1; // CS1 block->u.Packet_Uplink_Ack_Nack.u.PU_AckNack_GPRS_Struct.Ack_Nack_Description.FINAL_ACK_INDICATION = final; // FINAL ACK INDICATION - block->u.Packet_Uplink_Ack_Nack.u.PU_AckNack_GPRS_Struct.Ack_Nack_Description.STARTING_SEQUENCE_NUMBER = tbf->dir.ul.v_r; // STARTING_SEQUENCE_NUMBER + block->u.Packet_Uplink_Ack_Nack.u.PU_AckNack_GPRS_Struct.Ack_Nack_Description.STARTING_SEQUENCE_NUMBER = tbf->dir.ul.window.v_r(); // STARTING_SEQUENCE_NUMBER // RECEIVE_BLOCK_BITMAP - for (i = 0, bbn = (tbf->dir.ul.v_r - 64) & mod_sns_half; i < 64; + for (i = 0, bbn = (tbf->dir.ul.window.v_r() - 64) & mod_sns_half; i < 64; i++, bbn = (bbn + 1) & mod_sns_half) { bit = tbf->dir.ul.v_n[bbn]; if (bit == 0) |