diff options
author | Harald Welte <laforge@gnumonks.org> | 2014-01-19 17:18:21 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-01-19 17:32:59 +0100 |
commit | 1fe241294960e91057d215ff8260f1047e8a7cd0 (patch) | |
tree | 906625aedc0476a93f992f062cb13b2cc64552e6 /openbsc/src/libbsc/abis_nm.c | |
parent | 903aaea6689cc08c0e33fb05659c808a5e5f754f (diff) |
TSC: Add new gsm_ts_tsc() function to resolve TSC of TS
We don't want every caller to check for ts->tsc == -1 and then
using ts->trx->bts->tsc instead. Rather, introduce a new inline
function to retrieve the correct value.
Diffstat (limited to 'openbsc/src/libbsc/abis_nm.c')
-rw-r--r-- | openbsc/src/libbsc/abis_nm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index 717f56d8d..f491a0c20 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -1678,10 +1678,7 @@ int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, uint8_t chan_comb) } } } - if (ts->tsc == -1) - msgb_tv_put(msg, NM_ATT_TSC, bts->tsc); /* training sequence */ - else - msgb_tv_put(msg, NM_ATT_TSC, ts->tsc); /* training sequence */ + msgb_tv_put(msg, NM_ATT_TSC, gsm_ts_tsc(ts)); /* training sequence */ if (bts->type == GSM_BTS_TYPE_BS11) msgb_tlv_put(msg, 0x59, 1, &zero); |