aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/calib_file.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-12-19 23:36:06 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-02-27 11:10:33 +0100
commitb7eb9865df3d66df446ec40e34432f2fbd6546fe (patch)
treed8b5aef83d7dcc4c9ceb21ad675736f9b5ae868d /src/osmo-bts-sysmo/calib_file.c
parentdd2a51ed32959033cf965dfb243dd8fa44574f59 (diff)
calib: Use 2.4.0 as cut-off for the firmware, log errors
In case opening a calibration file is failing an error will will be logged, the caller and implementation were inconsistent about the API version that is supported for the calibration data, attempt to make the cut-off at 2.4.0.
Diffstat (limited to 'src/osmo-bts-sysmo/calib_file.c')
-rw-r--r--src/osmo-bts-sysmo/calib_file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/osmo-bts-sysmo/calib_file.c b/src/osmo-bts-sysmo/calib_file.c
index 43156565..6c93ed0d 100644
--- a/src/osmo-bts-sysmo/calib_file.c
+++ b/src/osmo-bts-sysmo/calib_file.c
@@ -130,7 +130,7 @@ static int read_int(FILE *in)
return i;
}
-int calib_file_read(const char *path, const struct calib_file_desc *desc,
+static int calib_file_read(const char *path, const struct calib_file_desc *desc,
SuperFemto_Prim_t *prim)
{
FILE *in;
@@ -142,8 +142,11 @@ int calib_file_read(const char *path, const struct calib_file_desc *desc,
fname[sizeof(fname)-1] = '\0';
in = fopen(fname, "r");
- if (!in)
+ if (!in) {
+ LOGP(DL1C, LOGL_ERROR,
+ "Failed to open '%s' for calibration data.\n", fname);
return -1;
+ }
#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,4,0)
if (desc->rx) {
@@ -244,6 +247,7 @@ static int calib_send_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg)
int calib_load(struct femtol1_hdl *fl1h)
{
#if SUPERFEMTO_API_VERSION < SUPERFEMTO_API(2,4,0)
+ LOGP(DL1C, LOGL_ERROR, "L1 calibration is not supported on pre 2.4.0 firmware.\n");
return -1;
#else
return calib_file_send(fl1h, &calib_files[0]);