diff options
author | Max <msuraev@sysmocom.de> | 2016-10-17 11:07:51 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2016-10-18 08:08:25 +0000 |
commit | ebb483b69a5319e522ba5f713e9cb6f68a814a6a (patch) | |
tree | bb3d719da7872869671c14029d9e410a40b1dc4f /src/osmo-bts-trx/l1_if.c | |
parent | b0c1d21581f009e9509e0fd995c86d1785785c7a (diff) |
Replace magic number with define
SDCCH occupy lchan 0..3 in combined configuration so for CCCH we've
always used lchan[4] - replace it with CCCH_LCHAN define and add
comment.
Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0
Diffstat (limited to 'src/osmo-bts-trx/l1_if.c')
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index b89a3594..4465f3b5 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -267,7 +267,7 @@ static int trx_init(struct gsm_bts_trx *trx) } if (trx == trx->bts->c0) - lchan_init_lapdm(&trx->ts[0].lchan[4]); + lchan_init_lapdm(&trx->ts[0].lchan[CCCH_LCHAN]); /* Set to Operational State: Enabled */ oml_mo_state_chg(&trx->mo, NM_OPSTATE_ENABLED, NM_AVSTATE_OK); @@ -288,7 +288,7 @@ int bts_model_trx_close(struct gsm_bts_trx *trx) /* deactivate lchan for CCCH */ if (pchan == GSM_PCHAN_CCCH || pchan == GSM_PCHAN_CCCH_SDCCH4) { - lchan_set_state(&trx->ts[0].lchan[4], LCHAN_S_INACTIVE); + lchan_set_state(&trx->ts[0].lchan[CCCH_LCHAN], LCHAN_S_INACTIVE); } /* power off transceiver, if not already */ @@ -408,8 +408,8 @@ static uint8_t trx_set_ts_as_pchan(struct gsm_bts_trx_ts *ts, /* activate lchan for CCCH */ if (pchan == GSM_PCHAN_CCCH || pchan == GSM_PCHAN_CCCH_SDCCH4) { - ts->lchan[4].rel_act_kind = LCHAN_REL_ACT_OML; - lchan_set_state(&ts->lchan[4], LCHAN_S_ACTIVE); + ts->lchan[CCCH_LCHAN].rel_act_kind = LCHAN_REL_ACT_OML; + lchan_set_state(&ts->lchan[CCCH_LCHAN], LCHAN_S_ACTIVE); } slottype = transceiver_chan_types[pchan]; |