driver: eth_mcux: gptp: limit rate_adjust range
Limit gptp range_adjust range for improved performance. Signed-off-by: Hake Huang <hake.huang@oss.nxp.com> Signed-off-by: Xabier Marquiegui <xmarquiegui@ainguraiiot.com>
This commit is contained in:
parent
d4c4a14737
commit
62db8ca0e6
|
@ -1656,7 +1656,8 @@ static int ptp_clock_mcux_rate_adjust(const struct device *dev, float ratio)
|
|||
float val;
|
||||
|
||||
/* No change needed. */
|
||||
if (ratio == 1.0f) {
|
||||
if ((ratio > 1.0 && ratio - 1.0 < 0.00000001) ||
|
||||
(ratio < 1.0 && 1.0 - ratio < 0.00000001)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue