diff options
author | Ivan Klyuchnikov <kluchnikovi@gmail.com> | 2017-01-26 14:32:37 +0000 |
---|---|---|
committer | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2017-02-10 13:35:41 +0000 |
commit | e2e0ed5a8962cd465fd5394815af20a46a1d23d2 (patch) | |
tree | d4fef9c15d21007606097831e68e189d2cb2e22d /src/osmo-bts-trx/l1_if.c | |
parent | d5414cc30e1568ca18d8dd8bd25d3174567327ec (diff) |
osmo-trx-bts: Fix incorrect setting of RXGAIN and POWER parameters on second channel (TRX1) of osmo-trx
Move rxgain and tx-attenuation (power) parameters from phy_link layer to phy_inst layer.
Rxgain and tx-attenuation parameters should be set for each phy_inst and send for each osmo-trx channel accordingly via control commands.
Change-Id: I4861a59d10d1ef91954e0c6ea265e66dec08844f
Diffstat (limited to 'src/osmo-bts-trx/l1_if.c')
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index a42d39a0..8c5115b8 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -203,17 +203,13 @@ int l1if_provision_transceiver_trx(struct trx_l1h *l1h) } /* after power on */ - if (l1h->phy_inst->num == 0) { - if (plink->u.osmotrx.rxgain_valid && - !plink->u.osmotrx.rxgain_sent) { - trx_if_cmd_setrxgain(l1h, plink->u.osmotrx.rxgain); - plink->u.osmotrx.rxgain_sent = 1; - } - if (plink->u.osmotrx.power_valid && - !plink->u.osmotrx.power_sent) { - trx_if_cmd_setpower(l1h, plink->u.osmotrx.power); - plink->u.osmotrx.power_sent = 1; - } + if (l1h->config.rxgain_valid && !l1h->config.rxgain_sent) { + trx_if_cmd_setrxgain(l1h, l1h->config.rxgain); + l1h->config.rxgain_sent = 1; + } + if (l1h->config.power_valid && !l1h->config.power_sent) { + trx_if_cmd_setpower(l1h, l1h->config.power); + l1h->config.power_sent = 1; } if (l1h->config.maxdly_valid && !l1h->config.maxdly_sent) { trx_if_cmd_setmaxdly(l1h, l1h->config.maxdly); @@ -238,10 +234,8 @@ int l1if_provision_transceiver_trx(struct trx_l1h *l1h) if (!l1h->config.poweron && !l1h->config.poweron_sent) { trx_if_cmd_poweroff(l1h); l1h->config.poweron_sent = 1; - if (l1h->phy_inst->num == 0) { - plink->u.osmotrx.rxgain_sent = 0; - plink->u.osmotrx.power_sent = 0; - } + l1h->config.rxgain_sent = 0; + l1h->config.power_sent = 0; l1h->config.maxdly_sent = 0; l1h->config.maxdlynb_sent = 0; for (tn = 0; tn < TRX_NR_TS; tn++) @@ -264,11 +258,10 @@ int l1if_provision_transceiver(struct gsm_bts *bts) l1h->config.tsc_sent = 0; l1h->config.bsic_sent = 0; l1h->config.poweron_sent = 0; - if (l1h->phy_inst->num == 0) { - plink->u.osmotrx.rxgain_sent = 0; - plink->u.osmotrx.power_sent = 0; - } + l1h->config.rxgain_sent = 0; + l1h->config.power_sent = 0; l1h->config.maxdly_sent = 0; + l1h->config.maxdlynb_sent = 0; for (tn = 0; tn < TRX_NR_TS; tn++) l1h->config.slottype_sent[tn] = 0; l1if_provision_transceiver_trx(l1h); @@ -390,10 +383,10 @@ static uint8_t trx_set_trx(struct gsm_bts_trx *trx) l1if_provision_transceiver_trx(l1h); } - if (plink->u.osmotrx.power_oml && pinst->num == 0) { - plink->u.osmotrx.power = trx->max_power_red; - plink->u.osmotrx.power_valid = 1; - plink->u.osmotrx.power_sent = 0; + if (l1h->config.power_oml) { + l1h->config.power = trx->max_power_red; + l1h->config.power_valid = 1; + l1h->config.power_sent = 0; l1if_provision_transceiver_trx(l1h); } |