Commit 08dd5d9f authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

wrpc-calibration: return sane delta values (0) if not provided by the WRPC

parent 2e326626
......@@ -34,21 +34,30 @@ int wrpc_read_calibration_data(struct pp_instance *ppi,
* if so read data */
if (state.calib.tx_calibrated) {
if (deltaTx)
{
*deltaTx = state.calib.delta_tx_phy
+ state.calib.sfp.delta_tx_ps
+ state.calib.delta_tx_board;
} else
}
} else {
*deltaTx = 0; // use some sane value
return WR_HW_CALIB_NOT_FOUND;
}
/* check if rx is calibrated,
* if so read data */
if (state.calib.rx_calibrated) {
if (deltaRx)
{
*deltaRx = state.calib.delta_rx_phy
+ state.calib.sfp.delta_rx_ps
+ state.calib.delta_rx_board;
} else
}
} else {
*deltaRx = 0; // use some sane value
return WR_HW_CALIB_NOT_FOUND;
}
return WR_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