tbf_dl_fsm_ctx: Properly define tbf backptr as dl_tbf
Since the tbf_fsm was split recently into tbf_dl_fsm and tbf_ul_fsm,
each has now its own ctx strucvture, which can hold the proper tbf
subclass.
Change-Id: Id2571e55e1fea2918207175f2030ec026e880bc1
diff --git a/src/tbf_fsm.h b/src/tbf_fsm.h
index a62e72d..2bdacc5 100644
--- a/src/tbf_fsm.h
+++ b/src/tbf_fsm.h
@@ -57,7 +57,10 @@
};
struct tbf_dl_fsm_ctx {
- struct gprs_rlcmac_tbf *tbf; /* back pointer */
+ union { /* back pointer. union used to easily access superclass from ctx */
+ struct gprs_rlcmac_tbf *tbf;
+ struct gprs_rlcmac_dl_tbf *dl_tbf;
+ };
uint32_t state_flags;
unsigned int T_release; /* Timer to be used to end release: T3169 or T3195 */
};