diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-27 17:01:14 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-30 21:24:13 +0100 |
commit | 474685e26ec4574aa2fab782b93bc50c23104905 (patch) | |
tree | 92c2559e38b043a344c91091738f9ef66fccb545 /src/tbf.h | |
parent | bd449f57a7914f3929a6b5be1cb31271db2ed1c0 (diff) |
tbf: Make the tlli "private" and update the updating code
Now all updates to the tlli/tlli_valid are in one place. If we
implement the policy to update the matching/linked TBF we can
now to do it in a single place. Add a todo item for that as I
am waiting for feedback from the mailinglist.
Diffstat (limited to 'src/tbf.h')
-rw-r--r-- | src/tbf.h | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -114,12 +114,16 @@ struct gprs_rlcmac_tbf { void poll_timeout(); + /** tlli handling */ + void update_tlli(uint32_t tlli); + uint32_t tlli() const; + bool is_tlli_valid() const; + void tlli_mark_valid(); + struct llist_head list; uint32_t state_flags; enum gprs_rlcmac_tbf_direction direction; uint8_t tfi; - uint32_t tlli; - uint8_t tlli_valid; struct gprs_rlcmac_trx *trx; uint8_t tsc; uint8_t first_ts; /* first TS used by TBF */ @@ -214,8 +218,16 @@ struct gprs_rlcmac_tbf { /* store the BTS this TBF belongs to */ BTS *bts; + /* + * private fields. We can't make it private as it is breaking the + * llist macros. + */ + uint32_t m_tlli; + uint8_t m_tlli_valid; + protected: gprs_rlcmac_bts *bts_data() const; + }; @@ -258,4 +270,14 @@ inline void gprs_rlcmac_tbf::set_state(enum gprs_rlcmac_tbf_state new_state) state = new_state; } +inline uint32_t gprs_rlcmac_tbf::tlli() const +{ + return m_tlli; +} + +inline bool gprs_rlcmac_tbf::is_tlli_valid() const +{ + return m_tlli_valid; +} + const char *tbf_name(gprs_rlcmac_tbf *tbf); |