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:
Max 2017-10-11 17:46:10 +02:00
parent 2d3aa02ba3
commit 3552247ae8
3 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);