aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-07-18 17:13:45 +0200
committerMax <msuraev@sysmocom.de>2017-07-18 19:02:02 +0200
commit91cecc051a19439733f8b86575e51f94015361ff (patch)
tree382fdb02831c1d912cdebf78ee79fc52f4bce305 /src/osmo-bts-litecell15
parent173a4f1f79a6e086682848b16169adbf283234c4 (diff)
lc15: fix BTS revision and hw options
* remove typo in logging * add missing return statement * fix compilation warnings * add detailed logging for supported GSM band and related errors Change-Id: I73bccd81ec56845ba11b939937b295eb0f51b4a8 Related: SYS#3728
Diffstat (limited to 'src/osmo-bts-litecell15')
-rw-r--r--src/osmo-bts-litecell15/l1_if.c18
-rw-r--r--src/osmo-bts-litecell15/misc/lc15bts_bid.c4
2 files changed, 15 insertions, 7 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index b82a7c6..cb3efab 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -1369,7 +1369,7 @@ static int info_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp,
fl1h->hw_info.fpga_version[1] = sic->fpgaVersion.minor;
fl1h->hw_info.fpga_version[2] = sic->fpgaVersion.build;
- LOGP(DL1C, LOGL_INFO, "DSP v%u.%u.%u, FPGA v%u.%u.%u\nn",
+ LOGP(DL1C, LOGL_INFO, "DSP v%u.%u.%u, FPGA v%u.%u.%u\n",
sic->dspVersion.major, sic->dspVersion.minor,
sic->dspVersion.build, sic->fpgaVersion.major,
sic->fpgaVersion.minor, sic->fpgaVersion.build);
@@ -1468,18 +1468,24 @@ static int get_hwinfo(struct lc15l1_hdl *fl1h)
int rc;
rc = lc15bts_rev_get();
- if (rc < 0)
+ if (rc < 0) {
+ LOGP(DL1C, LOGL_ERROR, "Failed to obtain LC15BTS revision: %d\n", rc);
return rc;
+ }
fl1h->hw_info.ver_major = rc;
rc = lc15bts_model_get();
- if (rc < 0)
+ if (rc < 0) {
+ LOGP(DL1C, LOGL_ERROR, "Failed to obtain LC15BTS model: %d\n", rc);
return rc;
+ }
fl1h->hw_info.ver_minor = rc;
rc = lc15bts_option_get(LC15BTS_OPTION_BAND);
- if (rc < 0)
+ if (rc < 0) {
+ LOGP(DL1C, LOGL_ERROR, "Failed to obtain LC15BTS_OPTION_BAND: %d\n", rc);
return rc;
+ }
switch (rc) {
case LC15BTS_BAND_850:
@@ -1495,8 +1501,12 @@ static int get_hwinfo(struct lc15l1_hdl *fl1h)
fl1h->hw_info.band_support = GSM_BAND_1900;
break;
default:
+ LOGP(DL1C, LOGL_ERROR, "Unexpected LC15BTS_BAND value: %d\n", rc);
return -1;
}
+
+ LOGP(DL1C, LOGL_INFO, "BTS hw support band %s\n", gsm_band_name(fl1h->hw_info.band_support));
+
return 0;
}
diff --git a/src/osmo-bts-litecell15/misc/lc15bts_bid.c b/src/osmo-bts-litecell15/misc/lc15bts_bid.c
index ba2037a..7f278bf 100644
--- a/src/osmo-bts-litecell15/misc/lc15bts_bid.c
+++ b/src/osmo-bts-litecell15/misc/lc15bts_bid.c
@@ -87,11 +87,11 @@ static inline bool read_board(const char *src, const char *spec, void *dst)
return false;
}
fclose(fp);
+ return true;
}
int lc15bts_rev_get(void)
{
- FILE *fp;
char rev;
if (board_rev != -1) {
@@ -107,9 +107,7 @@ int lc15bts_rev_get(void)
int lc15bts_model_get(void)
{
- FILE *fp;
int opt;
- bool rc;
if (board_option != -1)
return board_option;