aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-05-16 16:10:45 +0200
committerMax <msuraev@sysmocom.de>2017-05-26 07:55:52 +0000
commit9dabfa2c2b882bf4ce72c941f021f7a439de041a (patch)
tree6f060cdd5d071f9b156b5cbaafd1e167a4b3b71f /tests
parent356ac618f1f4b455e411507c4be4c9909fe927bb (diff)
Cleanup FN scheduling
* replace magic number with defined constant * move copy-pasted code to inline functions * remove unused code Change-Id: I6fee0714453d0c3c3f3f875f88daea2d9c477331 Related: OS#1524
Diffstat (limited to 'tests')
-rw-r--r--tests/tbf/TbfTest.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 496437d..0db7fde 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -56,20 +56,6 @@ static void check_tbf(gprs_rlcmac_tbf *tbf)
OSMO_ASSERT(tbf->T != 0);
}
-/*
-static unsigned inc_fn(fn)
-{
- unsigned next_fn;
-
- next_fn = fn + 4;
- if ((block_nr % 3) == 2)
- next_fn ++;
- next_fn = next_fn % 2715648;
-
- return next_fn;
-}
-*/
-
static void test_tbf_base()
{
@@ -209,7 +195,7 @@ static unsigned fn_add_blocks(unsigned fn, unsigned blocks)
unsigned bn = fn2bn(fn) + blocks;
fn = fn - (fn % 52);
fn += bn * 4 + bn / 3;
- return fn % 2715648;
+ return fn % GSM_MAX_FN;
}
static void request_dl_rlc_block(struct gprs_rlcmac_bts *bts,