This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgHello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/905 to look at the new patch set (#10). octphy: set tx attenuation via VTY add code to configure the transmision power via VTY Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981 --- M include/osmo-bts/phy_link.h M src/osmo-bts-octphy/l1_oml.c M src/osmo-bts-octphy/octphy_vty.c 3 files changed, 25 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/905/10 diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 6b2f21e..1f8450b 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -63,6 +63,7 @@ /* configuration */ uint32_t rf_port_index; uint32_t rx_gain_db; + bool tx_atten_flag; uint32_t tx_atten_db; #if OCTPHY_MULTI_TRX == 1 /* arfcn used by TRX with id 0 */ diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c index 74853bf..41f5bc2 100644 --- a/src/osmo-bts-octphy/l1_oml.c +++ b/src/osmo-bts-octphy/l1_oml.c @@ -1373,7 +1373,13 @@ oc->Config.usTsc = trx->bts->bsic & 0x7; oc->RfConfig.ulRxGainDb = plink->u.octphy.rx_gain_db; /* FIXME: compute this based on nominal transmit power, etc. */ - oc->RfConfig.ulTxAttndB = plink->u.octphy.tx_atten_db; + if (plink->u.octphy.tx_atten_flag) { + oc->RfConfig.ulTxAttndB = plink->u.octphy.tx_atten_db; + } else { + /* Take the Tx Attn received in set radio attribures + * x4 is for the value in db */ + oc->RfConfig.ulTxAttndB = (trx->max_power_red) << 2; + } #if OCTPHY_MULTI_TRX == 1 LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, " diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c index 3ea576c..fc0923d 100644 --- a/src/osmo-bts-octphy/octphy_vty.c +++ b/src/osmo-bts-octphy/octphy_vty.c @@ -136,9 +136,9 @@ } DEFUN(cfg_phy_tx_atten_db, cfg_phy_tx_atten_db_cmd, - "octphy tx-attenuation <0-359>", - OCT_STR "Configure the Tx Attenuation in quarter-dB\n" - "Tx attenuation in quarter-dB\n") + "octphy tx-attenuation (oml|<0-359>)", + OCT_STR "use either oml attribute value or specified tx-attenuation (quarter-dB)\n" + "oml or tx-attenuation in quarter-dB\n") { struct phy_link *plink = vty->index; @@ -148,7 +148,12 @@ return CMD_WARNING; } - plink->u.octphy.tx_atten_db = atoi(argv[0]); + if (strcmp(argv[0],"oml") == 0) { + plink->u.octphy.tx_atten_flag = false; + } else { + plink->u.octphy.tx_atten_db = atoi(argv[0]); + plink->u.octphy.tx_atten_flag = true; + } return CMD_SUCCESS; } @@ -202,8 +207,14 @@ VTY_NEWLINE); vty_out(vty, " rx-gain %u%s", plink->u.octphy.rx_gain_db, VTY_NEWLINE); - vty_out(vty, " tx-attenuation %u%s", plink->u.octphy.tx_atten_db, - VTY_NEWLINE); + + if (plink->u.octphy.tx_atten_flag) { + vty_out(vty, " tx-attenuation %u%s", + plink->u.octphy.tx_atten_db, VTY_NEWLINE); + } else { + vty_out(vty, " tx-attenuation oml%s", VTY_NEWLINE); + } + vty_out(vty, " rf-port-index %u%s", plink->u.octphy.rf_port_index, VTY_NEWLINE); } -- To view, visit https://gerrit.osmocom.org/905 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981 Gerrit-PatchSet: 10 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>