aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-31 20:56:18 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-21 16:25:07 +0200
commitb1ceb403630d093c364736def15b7c9f48f6fed0 (patch)
tree7ccf4227e0d4e9cd101ff8f971045ef2c97e8aa4 /src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
parent3ecb2bb60472ea291a5f13b4babe6fd9a7fba028 (diff)
sysmobts: Read the model number and trx once from the device
Use it for the ipaccess-find response and for the sysmobts classification code. This can be used by the vty in a second.
Diffstat (limited to 'src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c')
-rw-r--r--src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
index e5a2c800..3d1db152 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c
@@ -313,23 +313,10 @@ static void check_uctemp_timer_cb(void *data)
void sbts2050_uc_initialize(void)
{
- int val;
-
- if (sysmobts_par_get_int(SYSMOBTS_PAR_MODEL_NR, &val) < 0) {
- LOGP(DTEMP, LOGL_ERROR,
- "Failed to get Model number\n");
- return;
- }
-
- if (val != 2050)
- return;
-
- if (sysmobts_par_get_int(SYSMOBTS_PAR_TRX_NR, &val) < 0) {
- LOGP(DTEMP, LOGL_ERROR, "Failed to get the TRX number\n");
+ if (!is_sbts2050())
return;
- }
- if (val != 0)
+ if (!is_sbts2050_trx(0))
return;
ucontrol0.fd = osmo_serial_init(ucontrol0.path, 115200);