sysmo: use clock calibration source wrapper
Make get_clk_cal() public and use it for ctrl commands handling. This ensures that the calibration is properly selected depending on the clock source. Change-Id: I1c809d48f29ef8e8c50641f882d7a954dfcf88f9 Related: OS#1944
This commit is contained in:
parent
2d3aa02ba3
commit
3552247ae8
|
@ -1238,7 +1238,7 @@ static int activate_rf_compl_cb(struct gsm_bts_trx *trx, struct msgb *resp,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int get_clk_cal(struct femtol1_hdl *hdl)
|
||||
int get_clk_cal(struct femtol1_hdl *hdl)
|
||||
{
|
||||
#ifdef FEMTOBTS_API_VERSION
|
||||
return hdl->clk_cal;
|
||||
|
|
|
@ -146,6 +146,7 @@ int l1if_rsl_mode_modify(struct gsm_lchan *lchan);
|
|||
|
||||
/* calibration loading */
|
||||
int calib_load(struct femtol1_hdl *fl1h);
|
||||
int get_clk_cal(struct femtol1_hdl *hdl);
|
||||
|
||||
/* on-line re-calibration */
|
||||
int l1if_rf_clock_info_reset(struct femtol1_hdl *fl1h);
|
||||
|
|
|
@ -141,7 +141,7 @@ static int set_clock_info(struct ctrl_cmd *cmd, void *data)
|
|||
|
||||
/* Set GPS/PPS as reference */
|
||||
sysp->id = SuperFemto_PrimId_RfClockSetupReq;
|
||||
sysp->u.rfClockSetupReq.rfTrx.iClkCor = fl1h->clk_cal; /* !!! use get_clk_cal */
|
||||
sysp->u.rfClockSetupReq.rfTrx.iClkCor = get_clk_cal(fl1h);
|
||||
sysp->u.rfClockSetupReq.rfTrx.clkSrc = fl1h->clk_src;
|
||||
sysp->u.rfClockSetupReq.rfTrxClkCal.clkSrc = SuperFemto_ClkSrcId_GpsPps;
|
||||
l1if_req_compl(fl1h, msg, clock_setup_cb, NULL);
|
||||
|
|
Loading…
Reference in New Issue