Commit de2b6db5 authored by Adam Wujek's avatar Adam Wujek

arch-wrpc: remove rx_calibrated and tx_calibrated from state.calib

Signed-off-by: 's avatarAdam Wujek <adam.wujek@creotech.pl>
parent d6cd932f
......@@ -249,13 +249,12 @@ int wrc_ptp_start(void)
/* sfp match was done before so read calibration data */
if ( wrpc_read_calibration_data(ppi,NULL,
wrpc_read_calibration_data(ppi, NULL,
&scaledBitSlide,
&scaledDelayCoefficient,
&scaledSfpDeltaTx,
&scaledSfpDeltaRx)!= WRH_HW_CALIB_OK ) {
pp_diag(ppi, fsm, 1, "Cannot get calibration values (bitslide, alpha, TX/Rx delays\n");
}
&scaledSfpDeltaRx);
ppi->timestampCorrectionPortDS.semistaticLatency = scaledBitSlide;
if (scaledDelayCoefficient>=PP_MIN_DELAY_COEFFICIENT_AS_RELDIFF
&& scaledDelayCoefficient<=PP_MAX_DELAY_COEFFICIENT_AS_RELDIFF ) {
......
......@@ -40,23 +40,13 @@ int wrpc_read_calibration_data(
/* check if tx is calibrated,
* if so read data */
if (scaledSfpDeltaTx) {
if (state.calib.tx_calibrated) {
*scaledSfpDeltaTx = picos_to_interval(
state.calib.delta_tx_ps
);
} else
return WRH_HW_CALIB_NOT_FOUND;
*scaledSfpDeltaTx = picos_to_interval(state.calib.delta_tx_ps);
}
/* check if rx is calibrated,
* if so read data */
if (scaledSfpDeltaRx) {
if (state.calib.rx_calibrated) {
*scaledSfpDeltaRx = picos_to_interval(
state.calib.delta_rx_ps
);
} else
return WRH_HW_CALIB_NOT_FOUND;
*scaledSfpDeltaRx = picos_to_interval(state.calib.delta_rx_ps);
}
return WRH_HW_CALIB_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment