aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-19 17:37:48 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-30 21:24:09 +0100
commit17b0d83a1f1a153b21b198f101294c8ed9e172ac (patch)
tree0cd522f1ed4ec659bddaf36eaff8623c94c3eeb5 /src/bts.h
parentba5543fbf3f31819d63d4d6c019fe08893c32889 (diff)
pdch: Move enable/disable into the PDCH code
When a PDCH is disabled all resources should be freed. This is currently not possible as the PDCH does not know where it belongs to. On top of that the list (and other resources) should be properly initialized on construction so that disable() is idempotent and does not check if it was disabled. During the re-factoring I noticed that during a sysmobts re-start some resources are not freed. I left a warning in the code to resolve this issue later.
Diffstat (limited to 'src/bts.h')
-rw-r--r--src/bts.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/bts.h b/src/bts.h
index 4babd25a..8e88bc93 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -39,7 +39,17 @@ struct BTS;
* PDCH instance
*/
struct gprs_rlcmac_pdch {
- uint8_t enable; /* TS is enabled */
+#ifdef __cplusplus
+ /* TODO: the PDCH should know the trx/ts it belongs to */
+ void free_resources(uint8_t trx, uint8_t ts);
+
+ bool is_enabled() const;
+
+ void enable();
+ void disable();
+#endif
+
+ uint8_t m_is_enabled; /* TS is enabled */
uint8_t tsc; /* TSC of this slot */
uint8_t next_ul_tfi; /* next uplink TBF/TFI to schedule (0..31) */
uint8_t next_dl_tfi; /* next downlink TBF/TFI to schedule (0..31) */
@@ -135,4 +145,9 @@ extern "C" {
struct gprs_rlcmac_bts *bts_main_data();
#ifdef __cplusplus
}
+
+inline bool gprs_rlcmac_pdch::is_enabled() const
+{
+ return m_is_enabled;
+}
#endif