diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-01-20 22:50:06 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-02-15 14:27:29 +0100 |
commit | e9a17292e8545d5f651e9614c43bc1626e10ac5f (patch) | |
tree | 6e2cf1ae92d8c4cd6de786eb4f0f3aab18f9ef91 /src/osmo-bts-sysmo/calib_file.c | |
parent | 9b5cff87ecc4b76f9f8a0a86aa64e9394e2a8374 (diff) |
LC15/sysmobts: Don't try to refer to fl1h from PHY config
At the time the phy link / phy instance level VTY configuration
commands are parsed, we did not yet call l1if_open() and thus
pinst->u.{lc15,sysmobts}.hdl == NULL.
PHY or PHY instance specific configuration must thus be stored inside
the phy_link or phy_instance itself, and not inside the (not yet
existing) handle.
We solve this by moving around some parameters:
* clk_use_eeprom/clk_cal/clk_src/calib_path get replicated in
phy_instance
* min_qual_{rach,norm} are moved into the generic part (which means
that osmo-bts-octphy and osmo-bts-trx should also implement them)
Diffstat (limited to 'src/osmo-bts-sysmo/calib_file.c')
-rw-r--r-- | src/osmo-bts-sysmo/calib_file.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/osmo-bts-sysmo/calib_file.c b/src/osmo-bts-sysmo/calib_file.c index 884643f7..8cb09d93 100644 --- a/src/osmo-bts-sysmo/calib_file.c +++ b/src/osmo-bts-sysmo/calib_file.c @@ -390,12 +390,13 @@ static int calib_file_send(struct femtol1_hdl *fl1h, { struct calib_send_state *st = &fl1h->st; struct msgb *msg; + char *calib_path = fl1h->phy_inst->u.sysmobts.calib_path; int rc; msg = sysp_msgb_alloc(); - if (fl1h->calib_path) - rc = calib_file_read(fl1h->calib_path, desc, msgb_sysprim(msg)); + if (calib_path) + rc = calib_file_read(calib_path, desc, msgb_sysprim(msg)); else rc = calib_eeprom_read(desc, msgb_sysprim(msg)); if (rc < 0) { @@ -422,10 +423,11 @@ static int calib_send_compl_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg, { struct femtol1_hdl *fl1h = trx_femtol1_hdl(trx); struct calib_send_state *st = &fl1h->st; + char *calib_path = fl1h->phy_inst->u.sysmobts.calib_path; LOGP(DL1C, LOGL_NOTICE, "L1 calibration table %s loaded (src: %s)\n", calib_files[st->last_file_idx].fname, - fl1h->calib_path ? "file" : "eeprom"); + calib_path ? "file" : "eeprom"); msgb_free(l1_msg); |