multislot: Extracted "slot allocation algorithm" from tbf allocator

The current available algorithm only supports selecting a single slot
for downlink/uplink. (In the future, a multislot algorithm will follow.)
diff --git a/src/gprs_rlcmac_data.cpp b/src/gprs_rlcmac_data.cpp
index 0e8aca3..1b936fc 100644
--- a/src/gprs_rlcmac_data.cpp
+++ b/src/gprs_rlcmac_data.cpp
@@ -207,9 +207,9 @@
 				/* FIXME: send reject */
 				break;
 			}
-			/* FIXME: set number of downlink slots according to
-			 * multislot class */
-			ul_tbf = tbf_alloc(GPRS_RLCMAC_UL_TBF, tfi, trx, ts, 1);
+			/* use multislot class of downlink TBF */
+			ul_tbf = tbf_alloc(GPRS_RLCMAC_UL_TBF, tfi, trx, ts,
+				tbf->ms_class);
 			if (!ul_tbf) {
 				LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH ressource\n");
 				/* FIXME: send reject */
@@ -825,8 +825,8 @@
 		/* FIXME: send reject */
 		return -EBUSY;
 	}
-	/* select only one TS, since we don't know the multislot class yet */
-	tbf = tbf_alloc(GPRS_RLCMAC_UL_TBF, tfi, trx, ts, 1);
+	/* set class to 0, since we don't know the multislot class yet */
+	tbf = tbf_alloc(GPRS_RLCMAC_UL_TBF, tfi, trx, ts, 0);
 	if (!tbf) {
 		LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH ressource\n");
 		/* FIXME: send reject */