From 9d7357e4fe67ad4a2f00d173ab769f56afb23980 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 14 Dec 2017 15:02:33 +0100 Subject: TBF: unify EGPRS window calculation Move actual calculation into shared function and use it to set window size for TBF. TBT test output requires cosmetic adjuestements due to extended debug output. Change-Id: Ib9f4a277082da3c71007f5f3b4f2acac8b994540 Related: OS#1759 --- src/tbf.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/tbf.h') diff --git a/src/tbf.h b/src/tbf.h index 059bc785..6c9946e5 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -492,7 +492,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf { int release(); int abort(); uint16_t window_size() const; - void egprs_calc_window_size(); + void set_window_size(); void update_coding_scheme_counter_dl(const GprsCodingScheme cs); /* TODO: add the gettimeofday as parameter */ @@ -594,8 +594,8 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf { struct gprs_rlc_data *block, uint8_t *data, const uint8_t block_idx); - void egprs_calc_ulwindow_size(); uint16_t window_size() const; + void set_window_size(); void update_coding_scheme_counter_ul(const GprsCodingScheme cs); /* Please note that all variables here will be reset when changing @@ -676,4 +676,6 @@ inline gprs_rlcmac_dl_tbf *as_dl_tbf(gprs_rlcmac_tbf *tbf) return NULL; } +uint16_t egprs_window_size(const struct gprs_rlcmac_bts *bts_data, uint8_t slots); + #endif -- cgit v1.2.3