aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tbf.cpp6
-rw-r--r--tests/tbf/TbfTest.cpp7
-rw-r--r--tests/tbf/TbfTest.err3
3 files changed, 10 insertions, 6 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index cbc0710c..97696cb2 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -376,6 +376,12 @@ int gprs_rlcmac_tbf::update()
return -rc;
}
+ if (is_egprs_enabled()) {
+ gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(this);
+ if (dl_tbf)
+ dl_tbf->egprs_calc_window_size();
+ }
+
return 0;
}
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 4e37aa80..3e17d8fe 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -1816,17 +1816,14 @@ static void test_tbf_update_ws(void)
dl_tbf->update();
- /*
- * TODO: Should not expect window size as 192.
- * should be fixed in subsequent patch
- */
+ /* window size should be 384 */
OSMO_ASSERT(dl_tbf != NULL);
fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n",
dl_tbf->dl_slots(),
pcu_bitcount(dl_tbf->dl_slots()),
dl_tbf->window()->ws());
OSMO_ASSERT(pcu_bitcount(dl_tbf->dl_slots()) == 4);
- OSMO_ASSERT(dl_tbf->window()->ws() == 128 + 1 * 64);
+ OSMO_ASSERT(dl_tbf->window()->ws() == 128 + 4 * 64);
tbf_free(dl_tbf);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 90f04bee..0c9c877d 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -6400,7 +6400,8 @@ PDCH(TS 3, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS),
PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001.
- Assigning DL TS 5
PDCH(TS 5, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001.
-DL TBF slots: 0x3c, N: 4, WS: 192
+TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS): Setting EGPRS window size to 384
+DL TBF slots: 0x3c, N: 4, WS: 384
TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL EGPRS) changes state from NULL to RELEASING
TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING EGPRS) free
PDCH(TS 2, TRX 0): Detaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=RELEASING EGPRS), 0 TBFs, USFs = 00, TFIs = 00000000.