aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-12-13 14:14:32 +0100
committerpespin <pespin@sysmocom.de>2022-12-16 11:05:46 +0000
commit140c97c318ebb464ec4e139539c0670fc24b9001 (patch)
tree895845bdcd0d0e7b887b13a879b8314b779426b5 /src/tbf.h
parent345d9ad1b3895e6ca28e978c933df37a28106132 (diff)
Get rid of tbf->first_ts
There's no big benefit in keeping it stored since it can be quickly found. This makes the tbf data structure simplier and easier to maintain, and discharges the alloc_algorithm functions from an extra step. Change-Id: I5d2f665f648f8637466bfdd3bf7b924cb61ede33
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tbf.h b/src/tbf.h
index d4d52f93..4a08da97 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -148,6 +148,8 @@ const char* tbf_rlcmac_diag(const struct gprs_rlcmac_tbf *tbf);
bool tbf_is_control_ts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch);
bool tbf_can_upgrade_to_multislot(const struct gprs_rlcmac_tbf *tbf);
int tbf_update(struct gprs_rlcmac_tbf *tbf);
+struct gprs_rlcmac_pdch *tbf_get_first_ts(struct gprs_rlcmac_tbf *tbf);
+const struct gprs_rlcmac_pdch *tbf_get_first_ts_const(const struct gprs_rlcmac_tbf *tbf);
struct gprs_rlcmac_trx *tbf_get_trx(struct gprs_rlcmac_tbf *tbf);
void tbf_stop_timers(struct gprs_rlcmac_tbf *tbf, const char *reason);
#ifdef __cplusplus
@@ -218,7 +220,6 @@ struct gprs_rlcmac_tbf {
enum gprs_rlcmac_tbf_direction direction;
struct gprs_rlcmac_trx *trx;
- uint8_t first_ts; /* first TS used by TBF */
uint8_t control_ts; /* timeslot control messages and polling */
struct gprs_rlcmac_pdch *pdch[8]; /* list of PDCHs allocated to TBF */