aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c8
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c4
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c5
3 files changed, 11 insertions, 6 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
index 3064319f..9c42c24b 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
@@ -309,7 +309,7 @@ int sbts2050_uc_check_temp(int *temp_pa, int *temp_board)
void sbts2050_uc_initialize(void)
{
- if (!is_sbts2050_master())
+ if (!is_sbts2050())
return;
ucontrol0.fd = osmo_serial_init(ucontrol0.path, 115200);
@@ -319,8 +319,10 @@ void sbts2050_uc_initialize(void)
return;
}
- LOGP(DTEMP, LOGL_NOTICE, "Going to enable the PA.\n");
- sbts2050_uc_set_pa_power(1);
+ if (is_sbts2050_master()) {
+ LOGP(DTEMP, LOGL_NOTICE, "Going to enable the PA.\n");
+ sbts2050_uc_set_pa_power(1);
+ }
}
int sbts2050_uc_set_pa_power(int on_off)
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
index dac226f5..90203542 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c
@@ -99,7 +99,7 @@ static void execute_critical_act(struct sysmobts_mgr_instance *manager)
/* switch off the PA */
if (manager->action_crit & TEMP_ACT_PA_OFF) {
- if (!is_sbts2050_master()) {
+ if (!is_sbts2050()) {
LOGP(DTEMP, LOGL_NOTICE,
"PA can only be switched-off on the master\n");
} else if (sbts2050_uc_set_pa_power(0) != 0) {
@@ -185,7 +185,7 @@ static void temp_ctrl_check()
LOGP(DTEMP, LOGL_DEBUG, "RF temperature is: %d\n", temp);
}
- if (is_sbts2050_master()) {
+ if (is_sbts2050()) {
int temp_pa, temp_board;
rc = sbts2050_uc_check_temp(&temp_pa, &temp_board);
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c
index 16373748..9c8b15b3 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c
@@ -271,10 +271,13 @@ DEFUN(show_mgr, show_mgr_cmd, "show manager",
sysmobts_temp_get(SYSMOBTS_TEMP_RF,
SYSMOBTS_TEMP_INPUT) / 1000.0f,
VTY_NEWLINE);
- if (is_sbts2050_master()) {
+ if (is_sbts2050()) {
int temp_pa, temp_board;
struct sbts2050_power_status status;
+ vty_out(vty, " sysmoBTS 2050 is %s%s",
+ is_sbts2050_master() ? "master" : "slave", VTY_NEWLINE);
+
sbts2050_uc_check_temp(&temp_pa, &temp_board);
vty_out(vty, " sysmoBTS 2050 PA: %d Celcius%s", temp_pa, VTY_NEWLINE);
vty_out(vty, " sysmoBTS 2050 PA: %d Celcius%s", temp_board, VTY_NEWLINE);