diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-12-19 23:36:06 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-02-27 11:10:33 +0100 |
commit | b7eb9865df3d66df446ec40e34432f2fbd6546fe (patch) | |
tree | d8b5aef83d7dcc4c9ceb21ad675736f9b5ae868d /src | |
parent | dd2a51ed32959033cf965dfb243dd8fa44574f59 (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')
-rw-r--r-- | src/osmo-bts-sysmo/calib_file.c | 8 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/l1_if.c | 2 |
2 files changed, 7 insertions, 3 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]); diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index d848f7de..e42d26cc 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -1102,7 +1102,7 @@ static int reset_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp) /* obtain version information on DSP/FPGA and band capabilities */ l1if_get_info(fl1h); -#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,1,0) +#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,4,0) /* load calibration tables (if we know their path) */ if (fl1h->calib_path) calib_load(fl1h); |