Actions
Bug #1944
closedosmo-bts-sysmo: phy / instance / clock-source never used
Start date:
02/07/2017
Due date:
% Done:
100%
Spec Reference:
Description
osmo-bts-sysmo has a VTY option to set the clock source:
phy 0 instance 0 clock-source (tcxo|ocxo|ext|gps)
but apparently this is never used:
osmo-bts/src/osmo-bts-sysmo/l1_if.c
struct femtol1_hdl *l1if_open(struct phy_instance *pinst) { [...] fl1h->clk_src = pinst->u.sysmobts.clk_src; [...] #if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,1,0) if (fl1h->hw_info.model_nr == 2050) { /* On the sysmoBTS 2050, we don't have an OCXO but * start with the TCXO and will sync it with the PPS * of the GPS in case there is a fix. */ fl1h->clk_src = SuperFemto_ClkSrcId_Tcxo; LOGP(DL1C, LOGL_INFO, "Clock source defaulting to GPS 1PPS " "on sysmoBTS 2050\n"); } else { /* default clock source: OCXO */ fl1h->clk_src = SuperFemto_ClkSrcId_Ocxo; } #else fl1h->clk_src = SF_CLKSRC_OCXO; #endif
So even though clk_src is first set to the instance's value as from the VTY,
it gets overwritten with a hardcoded default in all code paths right after that.
Also note, the VTY config item clk_src defaults to zero,
which would omit clock calibration (get_clk_cal() returns 0).
The code above should probably have an if (!fl1h->clk_src)
condition so that the
hardcoded default is set only when the VTY config item is zero?
Actions