tbf: Keep a set of used TFI and USF per PDCH

Currently is is rather expensive to get TFI and USF usage per PDCH,
because the TBFs need to be scanned to get that information.

This commit adds corresponding bit sets which get updated by the
attach_tbf/detach_tbf methods of the gprs_rlcmac_pdch class.

Sponsored-by: On-Waves ehf
diff --git a/src/bts.h b/src/bts.h
index 79640af..b9909ce 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -75,6 +75,9 @@
 	void reserve(enum gprs_rlcmac_tbf_direction dir);
 	void unreserve(enum gprs_rlcmac_tbf_direction dir);
 	unsigned num_reserved(enum gprs_rlcmac_tbf_direction dir) const;
+
+	uint8_t assigned_usf() const;
+	uint32_t assigned_tfi() const;
 #endif
 
 	uint8_t m_is_enabled; /* TS is enabled */
@@ -105,6 +108,8 @@
 
 	uint8_t m_num_tbfs[2];
 	uint8_t m_num_reserved[2];
+	uint8_t m_assigned_usf; /* bit set */
+	uint32_t m_assigned_tfi; /* bit set */
 };
 
 struct gprs_rlcmac_trx {
@@ -333,6 +338,16 @@
 	return gprs_rlcmac_pdch::m_num_reserved[dir];
 }
 
+inline uint8_t gprs_rlcmac_pdch::assigned_usf() const
+{
+	return m_assigned_usf;
+}
+
+inline uint32_t gprs_rlcmac_pdch::assigned_tfi() const
+{
+	return m_assigned_tfi;
+}
+
 inline struct rate_ctr_group *BTS::rate_counters() const
 {
 	return m_ratectrs;