From f1593b7c49bd54caae9326c79156741e6078c412 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 24 Nov 2013 20:36:36 +0100 Subject: 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. --- src/encoding.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/encoding.cpp') 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) -- cgit v1.2.3