aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-06 20:23:56 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-06 20:23:56 +0100
commit28e5378b55acbb132d8855739351be832983cb68 (patch)
tree887593cdbe2151ff0b898fee0feedc1f8e7909c6 /src/tbf.h
parent9948514086594517ea3b72329d5c9bae7151f78f (diff)
llc: Begin creating a LLC class and move counts into it.
Begin to move state of the LLC into a separate object. This will allow to make side-effects more clear and kill some code duplication.
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/tbf.h b/src/tbf.h
index afbfdb3..b2da97e 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -84,6 +84,16 @@ enum gprs_rlcmac_tbf_direction {
#define GPRS_RLCMAC_FLAG_TO_DL_ASS 7
#define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */
+/**
+ * I represent the LLC data to a MS
+ */
+struct gprs_llc {
+ uint8_t frame[LLC_MAX_LEN]; /* current DL or UL frame */
+ uint16_t index; /* current write/read position of frame */
+ uint16_t length; /* len of current DL LLC_frame, 0 == no frame */
+ struct llist_head queue; /* queued LLC DL data */
+};
+
struct gprs_rlcmac_tbf {
static void free_all(struct gprs_rlcmac_trx *trx);
@@ -142,10 +152,8 @@ struct gprs_rlcmac_tbf {
uint8_t ms_class;
struct gprs_rlcmac_pdch *pdch[8]; /* list of PDCHs allocated to TBF */
uint16_t ta;
- uint8_t llc_frame[LLC_MAX_LEN]; /* current DL or UL frame */
- uint16_t llc_index; /* current write/read position of frame */
- uint16_t llc_length; /* len of current DL LLC_frame, 0 == no frame */
- struct llist_head llc_queue; /* queued LLC DL data */
+
+ gprs_llc m_llc;
enum gprs_rlcmac_tbf_dl_ass_state dl_ass_state;
enum gprs_rlcmac_tbf_ul_ass_state ul_ass_state;