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
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 @@
 		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 @@
 	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,