[PATCH] osmo-bts[master]: octphy: Fix vty write command

dexter gerrit-no-reply at lists.osmocom.org
Mon Jan 30 18:06:25 UTC 2017


Review at  https://gerrit.osmocom.org/1710

octphy: Fix vty write command

When issuing a write command via VTY, the generated configuration
will be unreadable. The problem only affacts osmo-bts-octphy since
the bug resides in octphy_vty.c only. Appeareantly the config file
is generated in an out dated syntax. This patch upgrades the write
functionality so that it can generate valid config files.

Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533
---
M src/osmo-bts-octphy/octphy_vty.c
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/10/1710/1

diff --git a/src/osmo-bts-octphy/octphy_vty.c b/src/osmo-bts-octphy/octphy_vty.c
index e134fc5..d2dd8a6 100644
--- a/src/osmo-bts-octphy/octphy_vty.c
+++ b/src/osmo-bts-octphy/octphy_vty.c
@@ -200,10 +200,10 @@
 void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink)
 {
 	if (plink->u.octphy.netdev_name)
-		vty_out(vty, " netdev %s%s", plink->u.octphy.netdev_name,
-			VTY_NEWLINE);
+		vty_out(vty, " octphy net-device %s%s",
+			plink->u.octphy.netdev_name, VTY_NEWLINE);
 
-	vty_out(vty, " hw-addr %02x:%02x:%02x:%02x:%02x:%02x%s",
+	vty_out(vty, " octphy hw-addr %02x:%02x:%02x:%02x:%02x:%02x%s",
 		plink->u.octphy.phy_addr.sll_addr[0],
 		plink->u.octphy.phy_addr.sll_addr[1],
 		plink->u.octphy.phy_addr.sll_addr[2],
@@ -211,16 +211,16 @@
 		plink->u.octphy.phy_addr.sll_addr[4],
 		plink->u.octphy.phy_addr.sll_addr[5],
 		VTY_NEWLINE);
-	vty_out(vty, "  rx-gain %u%s", plink->u.octphy.rx_gain_db,
+	vty_out(vty, " octphy rx-gain %u%s", plink->u.octphy.rx_gain_db,
 		VTY_NEWLINE);
 
 	if (plink->u.octphy.tx_atten_flag) {
-		vty_out(vty, "  tx-attenuation %u%s",
+		vty_out(vty, " octphy 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, " octphy tx-attenuation oml%s", VTY_NEWLINE);
 
-	vty_out(vty, "  rf-port-index %u%s", plink->u.octphy.rf_port_index,
+	vty_out(vty, " octphy rf-port-index %u%s", plink->u.octphy.rf_port_index,
 		VTY_NEWLINE);
 }
 

-- 
To view, visit https://gerrit.osmocom.org/1710
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib018e07e332aa8a6144fb2d87889032bd5fc2533
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>


More information about the gerrit-log mailing list