Rename tbf_alloc_dl_tbf() -> dl_tbf_alloc()

Rename it so that it follows the usual prefix for the type it allocates.

Change-Id: I7d30a85fefaa61d100fbd51af4601a3cf7de2159
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 5597ba4..6598067 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -694,7 +694,7 @@
 
 	bts_do_rate_ctr_inc(bts, CTR_TBF_REUSED);
 
-	new_tbf = tbf_alloc_dl_tbf(bts, ms(),
+	new_tbf = dl_tbf_alloc(bts, ms(),
 		this->trx->trx_no, false);
 
 	if (!new_tbf) {
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 6d02c8e..3a5a2e7 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -106,7 +106,7 @@
 	return 0;
 }
 
-struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot)
+struct gprs_rlcmac_dl_tbf *dl_tbf_alloc(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot)
 {
 	struct gprs_rlcmac_dl_tbf *tbf;
 	int rc;
@@ -210,7 +210,7 @@
 	// Create new TBF (any TRX)
 /* FIXME: Copy and paste with alloc_ul_tbf */
 	/* set number of downlink slots according to multislot class */
-	dl_tbf = tbf_alloc_dl_tbf(bts, ms, use_trx, ss);
+	dl_tbf = dl_tbf_alloc(bts, ms, use_trx, ss);
 
 	if (!dl_tbf) {
 		LOGPMS(ms, DTBF, LOGL_NOTICE, "No PDCH resource\n");
diff --git a/src/tbf_dl.h b/src/tbf_dl.h
index 5920672..1ed3fb2 100644
--- a/src/tbf_dl.h
+++ b/src/tbf_dl.h
@@ -118,7 +118,7 @@
 	return m_window.ws();
 }
 
-struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms,
+struct gprs_rlcmac_dl_tbf *dl_tbf_alloc(struct gprs_rlcmac_bts *bts, GprsMs *ms,
 					    int8_t use_trx, bool single_slot);
 
 #else /* ifdef __cplusplus */
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index b5d4b95..5e1f06d 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -48,7 +48,7 @@
 	if (dir == GPRS_RLCMAC_UL_TBF)
 		return tbf_alloc_ul_tbf(bts, ms, use_trx, single_slot);
 	else
-		return tbf_alloc_dl_tbf(bts, ms, use_trx, single_slot);
+		return dl_tbf_alloc(bts, ms, use_trx, single_slot);
 }
 
 static void check_tfi_usage(struct gprs_rlcmac_bts *bts)
@@ -231,7 +231,7 @@
 	dump_assignment(ul_tbf, "UL", verbose);
 
 	/* assume final ack has not been sent */
-	dl_tbf = tbf_alloc_dl_tbf(bts, ms, ms_current_trx(ms)->trx_no, false);
+	dl_tbf = dl_tbf_alloc(bts, ms, ms_current_trx(ms)->trx_no, false);
 	if (!dl_tbf)
 		return false;
 
@@ -265,7 +265,7 @@
 	ms = bts_alloc_ms(bts, ms_class, 0);
 	/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
 	ms_set_timeout(ms, 0);
-	dl_tbf = tbf_alloc_dl_tbf(bts, ms, -1, true);
+	dl_tbf = dl_tbf_alloc(bts, ms, -1, true);
 	if (!dl_tbf)
 		return false;
 
@@ -328,7 +328,7 @@
 	dump_assignment(ul_tbf, "UL", true);
 
 	/* assume final ack has not been sent */
-	dl_tbf = tbf_alloc_dl_tbf(bts, ms, trx_no, false);
+	dl_tbf = dl_tbf_alloc(bts, ms, trx_no, false);
 	if (!dl_tbf)
 		return false;
 
@@ -487,7 +487,7 @@
 	case TEST_MODE_DL_AND_UL:
 		if (ms_dl_tbf(old_ms))
 			tbf_free(ms_dl_tbf(old_ms));
-		tbf = tbf_alloc_dl_tbf(bts, old_ms, trx_no, false);
+		tbf = dl_tbf_alloc(bts, old_ms, trx_no, false);
 		if (tbf == NULL) {
 			OSMO_ASSERT(trx_no != -1 || bts_all_pdch_allocated(bts));
 			ms_unref(old_ms);
@@ -772,7 +772,7 @@
 	trx->pdch[7].enable();
 
 	ms = bts_alloc_ms(bts, ms_class, egprs_ms_class);
-	dl_tbf1 = tbf_alloc_dl_tbf(bts, ms, 0, false);
+	dl_tbf1 = dl_tbf_alloc(bts, ms, 0, false);
 	OSMO_ASSERT(dl_tbf1);
 
 	for (int i = 0; i < 8; i++) {
@@ -783,7 +783,7 @@
 	printf("TBF1: numTs(%d)\n", numTs1);
 
 	ms = bts_alloc_ms(bts, ms_class, egprs_ms_class);
-	dl_tbf2 = tbf_alloc_dl_tbf(bts, ms, 0, false);
+	dl_tbf2 = dl_tbf_alloc(bts, ms, 0, false);
 	OSMO_ASSERT(dl_tbf2);
 
 	for (int i = 0; i < 8; i++) {
diff --git a/tests/app_info/AppInfoTest.cpp b/tests/app_info/AppInfoTest.cpp
index 9530d09..6806f20 100644
--- a/tests/app_info/AppInfoTest.cpp
+++ b/tests/app_info/AppInfoTest.cpp
@@ -88,9 +88,9 @@
 	trx->pdch[7].enable();
 
 	ms1 = bts_alloc_ms(bts, 10, 11);
-	tbf1 = tbf_alloc_dl_tbf(bts, ms1, 0, false);
+	tbf1 = dl_tbf_alloc(bts, ms1, 0, false);
 	ms2 = bts_alloc_ms(bts, 12, 13);
-	tbf2 = tbf_alloc_dl_tbf(bts, ms2, 0, false);
+	tbf2 = dl_tbf_alloc(bts, ms2, 0, false);
 
 	fprintf(stderr, "\n");
 }
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 917806a..43ea8c7 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -123,7 +123,7 @@
 	 * Make a uplink and downlink allocation
 	 */
 	ms = bts_alloc_ms(bts, 0, 0);
-	gprs_rlcmac_tbf *dl_tbf = tbf_alloc_dl_tbf(bts,
+	gprs_rlcmac_tbf *dl_tbf = dl_tbf_alloc(bts,
 						ms, 0, false);
 	OSMO_ASSERT(dl_tbf != NULL);
 	dl_tbf->update_ms(0x2342, GPRS_RLCMAC_DL_TBF);
@@ -209,7 +209,7 @@
 
 	tfi = bts_tfi_find_free(bts, GPRS_RLCMAC_DL_TBF, &trx_no, -1);
 	OSMO_ASSERT(tfi >= 0);
-	dl_tbf = tbf_alloc_dl_tbf(bts, ms, trx_no, true);
+	dl_tbf = dl_tbf_alloc(bts, ms, trx_no, true);
 	OSMO_ASSERT(dl_tbf);
 	dl_tbf->set_ta(0);
 	check_tbf(dl_tbf);
@@ -2328,7 +2328,7 @@
 
 	/* Does no support EGPRS */
 	ms = bts_alloc_ms(bts, ms_class, 0);
-	dl_tbf = tbf_alloc_dl_tbf(bts, ms, 0, false);
+	dl_tbf = dl_tbf_alloc(bts, ms, 0, false);
 
 	ws_check(dl_tbf, __func__, 4, 64, true);
 
@@ -2336,7 +2336,7 @@
 
 	/* Does support EGPRS */
 	ms = bts_alloc_ms(bts, ms_class, ms_class);
-	dl_tbf = tbf_alloc_dl_tbf(bts, ms, 0, false);
+	dl_tbf = dl_tbf_alloc(bts, ms, 0, false);
 
 	ws_check(dl_tbf, __func__, 4, 128 + 4 * 64, true);
 	fprintf(stderr, "=== end %s ===\n", __func__);
@@ -2376,7 +2376,7 @@
 
 	/* Does support EGPRS */
 	ms = bts_alloc_ms(bts, ms_class, ms_class);
-	dl_tbf = tbf_alloc_dl_tbf(bts, ms, 0, true);
+	dl_tbf = dl_tbf_alloc(bts, ms, 0, true);
 
 	ws_check(dl_tbf, __func__, 1, 128 + 1 * 64, false);
 
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 90244dd..6b36d6d 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -779,7 +779,7 @@
 	bts->trx[0].pdch[3].enable();
 	GprsMs *ms = bts_alloc_ms(bts, 1, 0);
 
-	struct gprs_rlcmac_tbf *tbf = tbf_alloc_dl_tbf(bts, ms, 0, false);
+	struct gprs_rlcmac_tbf *tbf = dl_tbf_alloc(bts, ms, 0, false);
 	static uint8_t res[] = { 0x06,
 				 0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
 				 0x30, /* §10.5.2.26 Page Mode and §10.5.2.25b Dedicated mode/TBF */
diff --git a/tests/ulc/PdchUlcTest.cpp b/tests/ulc/PdchUlcTest.cpp
index 3547bf6..2501f60 100644
--- a/tests/ulc/PdchUlcTest.cpp
+++ b/tests/ulc/PdchUlcTest.cpp
@@ -182,7 +182,7 @@
 
 	struct gprs_rlcmac_bts *bts = setup_new_bts();
 	struct GprsMs *ms = ms_alloc(bts, 0x12345678);
-	struct gprs_rlcmac_tbf *tbf1 = tbf_alloc_dl_tbf(bts, ms, 0, true);
+	struct gprs_rlcmac_tbf *tbf1 = dl_tbf_alloc(bts, ms, 0, true);
 	struct gprs_rlcmac_pdch *pdch = &tbf1->trx->pdch[0];
 	int rc;
 	uint32_t fn, last_fn;