From 69e00ccd6ff3a19b771070b78ed3d85dd219799f Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 9 Oct 2019 13:38:38 +0200 Subject: gsm0508: add functions to calculate beginning of a block The calculation of the beginning of a block for TCH/F, TCH/H and FACCH can be challenging since those channels are affected by the diagonal interleaving of the TCH channels. However, GSM 05.02 Section 7 Table 1 of 5 specifies how the blocks are distributed over the TDMA frame interval. Lets add a mapping function that is based on that table Related: OS#3803 Change-Id: I3d71c66f8c401f5afbad9b1c86c24580dab9e0ce --- include/osmocom/gsm/gsm0502.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/osmocom/gsm') diff --git a/include/osmocom/gsm/gsm0502.h b/include/osmocom/gsm/gsm0502.h index fe5cf7e1..c9901dfd 100644 --- a/include/osmocom/gsm/gsm0502.h +++ b/include/osmocom/gsm/gsm0502.h @@ -35,3 +35,15 @@ gsm0502_get_paging_group(uint64_t imsi, unsigned int bs_cc_chans, unsigned int gsm0502_calc_paging_group(struct gsm48_control_channel_descr *chan_desc, uint64_t imsi); + +enum gsm0502_fn_remap_channel { + FN_REMAP_TCH_F, + FN_REMAP_TCH_H0, + FN_REMAP_TCH_H1, + FN_REMAP_FACCH_F, + FN_REMAP_FACCH_H0, + FN_REMAP_FACCH_H1, + FN_REMAP_MAX, +}; + +uint32_t gsm0502_fn_remap(uint32_t fn, enum gsm0502_fn_remap_channel channel); -- cgit v1.2.3