diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2018-10-10 11:58:02 +0200 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2018-10-10 11:58:02 +0200 |
commit | b15af63ae920a9d7f76a8d42e589926be574b494 (patch) | |
tree | bd2406ab9cd5afb343b4bf6902f14990583df530 /tests | |
parent | bf3eb8f6eb8410b643bde366f9a5e6fcc0556d14 (diff) |
codec_pref: also check physical channels
At the moment codec_pref only checks the codec configuration, but it
does not check if there is actually a matching physical channel
available. This should be checked too we must make sure that the codec
we select fits the physical channels available on the BTS.
Change-Id: I2d29dfed450e5ef93c26ed5ec9fdc0730eb3d7dd
Related: OS#3503
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codec_pref/codec_pref_test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/codec_pref/codec_pref_test.c b/tests/codec_pref/codec_pref_test.c index e2876e2c8..534b99ef7 100644 --- a/tests/codec_pref/codec_pref_test.c +++ b/tests/codec_pref/codec_pref_test.c @@ -294,6 +294,7 @@ static void make_bts_config(struct gsm_bts *bts, uint8_t config_no) /* Note: FR is supported by all BTSs, so there is no flag for it */ struct gsm48_multi_rate_conf *cfg; + static struct gsm_bts_trx trx; OSMO_ASSERT(config_no < N_CONFIG_VARIANTS); @@ -324,6 +325,13 @@ static void make_bts_config(struct gsm_bts *bts, uint8_t config_no) cfg->m10_2 = 0; cfg->m12_2 = 0; + /* Initalize TRX with a TCH/F and a TCH/H channel */ + memset(&trx, 0, sizeof(trx)); + INIT_LLIST_HEAD(&bts->trx_list); + llist_add(&trx.list, &bts->trx_list); + trx.ts[0].pchan_from_config = GSM_PCHAN_TCH_F; + trx.ts[1].pchan_from_config = GSM_PCHAN_TCH_H; + switch (config_no) { case 0: /* FR1 (implicit) only */ |