aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-14 18:05:44 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:35 +0100
commitd7630f2256f7e99240c214b5c3310cf650e393d5 (patch)
tree1e391a8a815d1f855f3303e89d9d99386e4d1b86 /src
parent419b03497555eec53bc5759f6838d6a464987b99 (diff)
edge: Use bitvec based window methods for EGPRS
Currently a faked 'old' RBB with 64 ACKs is being used. Use the new bitvec based methods instead. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/bts.cpp35
1 files changed, 12 insertions, 23 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index d95dd86..eb07918 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1031,31 +1031,20 @@ void gprs_rlcmac_pdch::rcv_control_egprs_dl_ack_nack(EGPRS_PD_AckNack_t *ack_nac
&ack_nack->EGPRS_AckNack.Desc, &bits,
&bsn_begin, &bsn_end, &tbf->m_window);
- for (int i = 0; i < num_blocks; i++) {
- show_bits[i] = bitvec_get_bit_pos(&bits, i) ? 'R' : 'I';
- }
- show_bits[num_blocks] = 0;
-
LOGP(DRLCMAC, LOGL_DEBUG,
- "EGPRS DL ACK bitmap: BSN %d to %d - 1 (%d blocks): %s\n",
- bsn_begin, bsn_end, num_blocks, show_bits);
-
- if (ack_nack->EGPRS_AckNack.Desc.URBB_LENGTH == 0 &&
- !ack_nack->EGPRS_AckNack.Desc.Exist_CRBB)
- {
- /* Everything has been received successfully */
- /* Fake a GPRS type ack */
- uint64_t fake_map = -1;
-
- rc = tbf->rcvd_dl_ack(
- ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION,
- tbf->m_window.mod_sns(ack_nack->EGPRS_AckNack.Desc.STARTING_SEQUENCE_NUMBER-1),
- (uint8_t *)&fake_map);
+ "Got EGPRS DL ACK bitmap: SSN: %d, BSN %d to %d - 1 (%d blocks), "
+ "\"%s\"\n",
+ ack_nack->EGPRS_AckNack.Desc.STARTING_SEQUENCE_NUMBER,
+ bsn_begin, bsn_end, num_blocks,
+ (Decoding::extract_rbb(&bits, show_bits), show_bits)
+ );
- if (rc == 1) {
- tbf_free(tbf);
- return;
- }
+ rc = tbf->rcvd_dl_ack(
+ ack_nack->EGPRS_AckNack.Desc.FINAL_ACK_INDICATION,
+ bsn_begin, &bits);
+ if (rc == 1) {
+ tbf_free(tbf);
+ return;
}
/* check for channel request */