aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-10-28 09:42:59 +0100
committerHarald Welte <laforge@gnumonks.org>2013-10-28 10:15:48 +0100
commit99fb43f41a47dbfc922ac6e447a603ddd96a0b2b (patch)
tree3cf494e09a9109efc7b7fc4d0c5378e1e88b314e /src
parentb8687024eac87d325056db55ff181da2ded8a310 (diff)
sysmobts calibration: Load further tables even if one fails
Even if one calibration table cannot be loaded, continue to try to load the other tables, instead of aborting very early.
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bts-sysmo/calib_file.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/calib_file.c b/src/osmo-bts-sysmo/calib_file.c
index 7b3e6ac9..5c7d56af 100644
--- a/src/osmo-bts-sysmo/calib_file.c
+++ b/src/osmo-bts-sysmo/calib_file.c
@@ -374,6 +374,7 @@ static int calib_send_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg);
static int calib_file_send(struct femtol1_hdl *fl1h,
const struct calib_file_desc *desc)
{
+ struct calib_send_state *st = &fl1h->st;
struct msgb *msg;
int rc;
@@ -385,7 +386,16 @@ static int calib_file_send(struct femtol1_hdl *fl1h,
rc = calib_eeprom_read(desc, msgb_sysprim(msg));
if (rc < 0) {
msgb_free(msg);
- return rc;
+
+ /* still, we'd like to continue trying to load
+ * calibration for all other bands */
+ st->last_file_idx = next_calib_file_idx(fl1h->hw_info.band_support,
+ st->last_file_idx);
+ if (st->last_file_idx >= 0)
+ return calib_file_send(fl1h,
+ &calib_files[st->last_file_idx]);
+ else
+ return rc;
}
calib_fixup_rx(fl1h, msgb_sysprim(msg));