diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-05-30 03:59:16 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-05-30 03:59:16 +0700 |
commit | 1a66c2991cbd90e5bdc51bfcfcfcd851b4abb2a3 (patch) | |
tree | 8a8029c9848985028ca2822c499474aefd311f9b /src/host/trxcon/sched_trx.h | |
parent | 043136937a836236a9f013b0278a3ffeba51f4f4 (diff) |
trxcon/scheduler: move PRIM_IS[_EXT]_RACH macros to sched_trx.h
Both PRIM_IS_RACH() and PRIM_IS_EXT_RACH() macros to be used for
handover RACH detection in the follow up changes, thus we need
have them widely available. Let's also give them better names:
PRIM_IS_EXT_RACH -> PRIM_IS_RACH11
PRIM_IS_RACH -> PRIM_IS_RACH8
and introduce a new generic one for checking whether a given
primitive is RACH in general (either 8-bit or 11-bit) or not.
Change-Id: Ibc39c57fda000647be1829786f6423dcf3f435cd
Diffstat (limited to 'src/host/trxcon/sched_trx.h')
-rw-r--r-- | src/host/trxcon/sched_trx.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index fcb78a79..6ef9ce47 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -309,6 +309,16 @@ int sched_prim_push(struct trx_instance *trx, #define CHAN_IS_SACCH(chan) \ (trx_lchan_desc[chan].link_id & TRX_CH_LID_SACCH) +/* FIXME: we need a better way to identify / distinguish primitives */ +#define PRIM_IS_RACH11(prim) \ + (prim->payload_len == sizeof(struct l1ctl_ext_rach_req)) + +#define PRIM_IS_RACH8(prim) \ + (prim->payload_len == sizeof(struct l1ctl_rach_req)) + +#define PRIM_IS_RACH(prim) \ + (PRIM_IS_RACH8(prim) || PRIM_IS_RACH11(prim)) + #define PRIM_IS_TCH(prim) \ (CHAN_IS_TCH(prim->chan) && prim->payload_len != GSM_MACBLOCK_LEN) |