aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts/scheduler_backend.h
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-01 22:54:15 +0700
committerlaforge <laforge@gnumonks.org>2019-06-08 10:09:42 +0000
commit01c539284e85c5d907300e45548d497cca27217b (patch)
tree6acad2cf7d42282bccda8566eb55255d65eb3bc3 /include/osmo-bts/scheduler_backend.h
parent2dec9fff1cc78dd70e23a752acb9e9d002527be7 (diff)
common/scheduler.c: refactor description of TRXC_* lchans
Let's avoid fancy alignment in the description of logical channels for the benefits of having better readability, the ability to add more comments and fields without making it look ugly. Get rid of value-string array 'trx_chan_type_names', since each logical channel has its name defined in 'trx_chan_desc'. Get rid of field 'chan' of 'trx_lchan_desc' structure since it's not used anywhere, and not actually needed because the position of each lchan description is defined by its TRXC_* type. Replace both 'pdch' and 'auto_active' fields with more generic bitmask field called 'flags', and define the following flags: - TRX_CHAN_FLAG_AUTO_ACTIVE, - TRX_CHAN_FLAG_PDCH. Use RSL channel mode #defines from libosmogsm instead of having hard-coded numbers. This increases readability. As a bonus, let's add a human readable description to each lchan definition, so it can be printed in the VTY some day. Change-Id: I9d5d49ec569f133d37b8164b22607d4700474315 Backported from: I2fc61e1cdca4690a34e2861b9ee3b7c64ea64843 I7ab4958801b3422973b67ff0452b90afa8a3f501
Diffstat (limited to 'include/osmo-bts/scheduler_backend.h')
-rw-r--r--include/osmo-bts/scheduler_backend.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/osmo-bts/scheduler_backend.h b/include/osmo-bts/scheduler_backend.h
index dbd93195..505f4d70 100644
--- a/include/osmo-bts/scheduler_backend.h
+++ b/include/osmo-bts/scheduler_backend.h
@@ -19,24 +19,22 @@ typedef int trx_sched_ul_func(struct l1sched_trx *l1t, uint8_t tn,
int8_t rssi, int16_t toa256);
struct trx_chan_desc {
- /*! \brief Is this on a PDCH (PS) ? */
- int pdch;
- /*! \brief TRX Channel Type */
- enum trx_chan_type chan;
+ /*! \brief Human-readable name */
+ const char *name;
+ /*! \brief Human-readable description */
+ const char *desc;
/*! \brief Channel Number (like in RSL) */
uint8_t chan_nr;
/*! \brief Link ID (like in RSL) */
uint8_t link_id;
- /*! \brief Human-readable name */
- const char *name;
/*! \brief function to call when we want to generate RTS.req to L2 */
trx_sched_rts_func *rts_fn;
/*! \brief function to call when DATA.req received from L2 */
trx_sched_dl_func *dl_fn;
/*! \brief function to call when burst received from PHY */
trx_sched_ul_func *ul_fn;
- /*! \brief is this channel automatically active at start? */
- int auto_active;
+ /*! \brief channel flags, see TRX_CHAN_FLAG_* */
+ uint8_t flags;
};
extern const struct trx_chan_desc trx_chan_desc[_TRX_CHAN_MAX];