aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-21 16:12:30 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-21 16:25:07 +0200
commit46c085d794d9c973528718b62caeb41443a53417 (patch)
tree05971c555896754d2eaee62eac29faba2039a806 /src/osmo-bts-sysmo
parentb1ceb403630d093c364736def15b7c9f48f6fed0 (diff)
sysmobts: Add is_sbts2050_master
Diffstat (limited to 'src/osmo-bts-sysmo')
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr.c9
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c5
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_misc.h1
3 files changed, 11 insertions, 4 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
index eb15c63f..f8b3302e 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr.c
@@ -82,6 +82,15 @@ int is_sbts2050_trx(int trx)
return trx_number == trx;
}
+int is_sbts2050_master(void)
+{
+ if (!is_sbts2050())
+ return 0;
+ if (!is_sbts2050_trx(0))
+ return 0;
+ return 1;
+}
+
static struct osmo_timer_list temp_timer;
static void check_temp_timer_cb(void *unused)
{
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
index 3d1db152..ce1aaf8c 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
@@ -313,10 +313,7 @@ static void check_uctemp_timer_cb(void *data)
void sbts2050_uc_initialize(void)
{
- if (!is_sbts2050())
- return;
-
- if (!is_sbts2050_trx(0))
+ if (!is_sbts2050_master())
return;
ucontrol0.fd = osmo_serial_init(ucontrol0.path, 115200);
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_misc.h b/src/osmo-bts-sysmo/misc/sysmobts_misc.h
index baa39889..238095dd 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_misc.h
+++ b/src/osmo-bts-sysmo/misc/sysmobts_misc.h
@@ -45,6 +45,7 @@ int sysmobts_firmware_reload(enum sysmobts_firmware_type type);
int is_sbts2050(void);
int is_sbts2050_trx(int);
+int is_sbts2050_master(void);
void sbts2050_uc_check_temp(int *temp_pa, int *temp_board);
void sbts2050_uc_set_power(int pmaster, int pslave, int ppa);