tbf: Make tfi private and update the code
All logging code that used tbf->tfi is now using tbf_name to
print the the TBF. External code is now using tfi() which is
inlined and should result in the same code being generated as
before (+debug code that can be stripped).
diff --git a/src/tbf.h b/src/tbf.h
index 5d2a10b..e8b66c9 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -120,10 +120,11 @@
bool is_tlli_valid() const;
void tlli_mark_valid();
+ uint8_t tfi() const;
+
struct llist_head list;
uint32_t state_flags;
enum gprs_rlcmac_tbf_direction direction;
- uint8_t tfi;
struct gprs_rlcmac_trx *trx;
uint8_t tsc;
uint8_t first_ts; /* first TS used by TBF */
@@ -224,6 +225,7 @@
*/
uint32_t m_tlli;
uint8_t m_tlli_valid;
+ uint8_t m_tfi;
protected:
gprs_rlcmac_bts *bts_data() const;
@@ -280,4 +282,9 @@
return m_tlli_valid;
}
+inline uint8_t gprs_rlcmac_tbf::tfi() const
+{
+ return m_tfi;
+}
+
const char *tbf_name(gprs_rlcmac_tbf *tbf);