aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/abis_nm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-01-19 17:18:21 +0100
committerHarald Welte <laforge@gnumonks.org>2014-01-19 17:32:59 +0100
commit1fe241294960e91057d215ff8260f1047e8a7cd0 (patch)
tree906625aedc0476a93f992f062cb13b2cc64552e6 /openbsc/src/libbsc/abis_nm.c
parent903aaea6689cc08c0e33fb05659c808a5e5f754f (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.c5
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);