aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-trx/l1_if.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-01-09 18:25:22 +0100
committerHarald Welte <laforge@gnumonks.org>2016-01-16 17:49:04 +0100
commitdd562d84bab5974f7b3505500bc9eced52252904 (patch)
tree4b223cfa13d8c93640058b090b0f5356128a7c15 /src/osmo-bts-trx/l1_if.c
parent773ab8b2c52d0145561e113e8af7bb839bbe4749 (diff)
TRX: Don't use magic numbers when we have #defines
Diffstat (limited to 'src/osmo-bts-trx/l1_if.c')
-rw-r--r--src/osmo-bts-trx/l1_if.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index e9d7a02b..a45ba05b 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -111,7 +111,7 @@ static void check_transceiver_availability_trx(struct trx_l1h *l1h, int avail)
oml_mo_state_chg(&trx->bb_transc.mo, -1, NM_AVSTATE_OK);
oml_mo_tx_sw_act_rep(&trx->bb_transc.mo);
- for (tn = 0; tn < 8; tn++)
+ for (tn = 0; tn < TRX_NR_TS; tn++)
oml_mo_state_chg(&trx->ts[tn].mo, NM_OPSTATE_DISABLED,
(l1h->config.slotmask & (1 << tn)) ?
NM_AVSTATE_DEPENDENCY :
@@ -122,7 +122,7 @@ static void check_transceiver_availability_trx(struct trx_l1h *l1h, int avail)
oml_mo_state_chg(&trx->bb_transc.mo, NM_OPSTATE_DISABLED,
NM_AVSTATE_OFF_LINE);
- for (tn = 0; tn < 8; tn++)
+ for (tn = 0; tn < TRX_NR_TS; tn++)
oml_mo_state_chg(&trx->ts[tn].mo, NM_OPSTATE_DISABLED,
NM_AVSTATE_OFF_LINE);
}
@@ -188,7 +188,7 @@ int l1if_provision_transceiver_trx(struct trx_l1h *l1h)
trx_if_cmd_setmaxdly(l1h, l1h->config.maxdly);
l1h->config.maxdly_sent = 1;
}
- for (tn = 0; tn < 8; tn++) {
+ for (tn = 0; tn < TRX_NR_TS; tn++) {
if (l1h->config.slottype_valid[tn]
&& !l1h->config.slottype_sent[tn]) {
trx_if_cmd_setslot(l1h, tn,
@@ -205,7 +205,7 @@ int l1if_provision_transceiver_trx(struct trx_l1h *l1h)
l1h->config.rxgain_sent = 0;
l1h->config.power_sent = 0;
l1h->config.maxdly_sent = 0;
- for (tn = 0; tn < 8; tn++)
+ for (tn = 0; tn < TRX_NR_TS; tn++)
l1h->config.slottype_sent[tn] = 0;
}
@@ -227,7 +227,7 @@ int l1if_provision_transceiver(struct gsm_bts *bts)
l1h->config.rxgain_sent = 0;
l1h->config.power_sent = 0;
l1h->config.maxdly_sent = 0;
- for (tn = 0; tn < 8; tn++)
+ for (tn = 0; tn < TRX_NR_TS; tn++)
l1h->config.slottype_sent[tn] = 0;
l1if_provision_transceiver_trx(l1h);
}