aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-08 18:35:52 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-08 18:37:08 +0300
commitc4368ce3abd02555aff61d9c96c70b54df4cc353 (patch)
treea56167720d030c7e9086feb07b7312f7c5629086
parentf5b756e484570e74692a7938e025bec4f84743c0 (diff)
osmo-bts-trx: move AMR CMI lookup tables to the respective files
It makes no sense to have these tables in the header file, because they're not used anywhere outside of the respective lchan handlers. Change-Id: Ibdebfb9b1ef78c960b08240ebdb4c7af92cbed11 Related: SYS#5916
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchf.c7
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c11
-rw-r--r--src/osmo-bts-trx/sched_utils.h18
3 files changed, 18 insertions, 18 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 4f5d6d3c..9e88ce9e 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -45,6 +45,13 @@
#include <sched_utils.h>
#include <loops.h>
+/* 3GPP TS 45.009, table 3.2.1.3-{1,3}: AMR on Uplink TCH/F */
+static const uint8_t sched_tchf_ul_amr_cmi_map[26] = {
+ [7] = 1, /* TCH/F: first=0 / last=7 */
+ [16] = 1, /* TCH/F: first=8 / last=16 */
+ [24] = 1, /* TCH/F: first=17 / last=24 */
+};
+
/*! \brief a single TCH/F burst was received by the PHY, process it */
int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 21fb62c9..17b3a3b3 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -45,6 +45,17 @@
#include <sched_utils.h>
#include <loops.h>
+/* 3GPP TS 45.009, table 3.2.1.3-{2,4}: AMR on Uplink TCH/H */
+static const uint8_t sched_tchh_ul_amr_cmi_map[26] = {
+ [6] = 1, /* TCH/H(0): first=0 / last=6 */
+ [15] = 1, /* TCH/H(0): first=8 / last=15 */
+ [23] = 1, /* TCH/H(0): first=17 / last=23 */
+
+ [7] = 1, /* TCH/H(1): first=1 / last=7 */
+ [16] = 1, /* TCH/H(1): first=9 / last=16 */
+ [24] = 1, /* TCH/H(1): first=18 / last=24 */
+};
+
/*! \brief a single TCH/H burst was received by the PHY, process it */
int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{
diff --git a/src/osmo-bts-trx/sched_utils.h b/src/osmo-bts-trx/sched_utils.h
index 398083d9..f76e49bb 100644
--- a/src/osmo-bts-trx/sched_utils.h
+++ b/src/osmo-bts-trx/sched_utils.h
@@ -37,24 +37,6 @@ static inline uint16_t compute_ber10k(int n_bits_total, int n_errors)
return 10000 * n_errors / n_bits_total;
}
-/* 3GPP TS 45.009, table 3.2.1.3-{1,3}: AMR on Uplink TCH/F */
-static const uint8_t sched_tchf_ul_amr_cmi_map[26] = {
- [7] = 1, /* TCH/F: first=0 / last=7 */
- [16] = 1, /* TCH/F: first=8 / last=16 */
- [24] = 1, /* TCH/F: first=17 / last=24 */
-};
-
-/* 3GPP TS 45.009, table 3.2.1.3-{2,4}: AMR on Uplink TCH/H */
-static const uint8_t sched_tchh_ul_amr_cmi_map[26] = {
- [6] = 1, /* TCH/H(0): first=0 / last=6 */
- [15] = 1, /* TCH/H(0): first=8 / last=15 */
- [23] = 1, /* TCH/H(0): first=17 / last=23 */
-
- [7] = 1, /* TCH/H(1): first=1 / last=7 */
- [16] = 1, /* TCH/H(1): first=9 / last=16 */
- [24] = 1, /* TCH/H(1): first=18 / last=24 */
-};
-
/*! determine whether an uplink AMR block is CMI according to 3GPP TS 45.009.
* \param[in] fn_begin frame number of the beginning of the block.
* \returns true in case of CMI; false otherwise. */