ptp: tg3: convert .adjfreq to .adjfine
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 9 Nov 2022 23:09:39 +0000 (15:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Nov 2022 10:58:39 +0000 (10:58 +0000)
commite3f18e9d353aa8bd9e4db10acab21df380e212f5
tree5b60132139cd464dac93517e55996741c8e08327
parent319d77e9d059d4e7b0aba923578faed038d9038c
ptp: tg3: convert .adjfreq to .adjfine

The tg3 implementation of .adjfreq is implemented in terms of a
straight forward "base * ppb / 1 billion" calculation.

Convert this to the newer .adjfine, using the recently added
diff_by_scaled_ppm helper function to calculate the difference and
direction of the adjustment.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Cc: Siva Reddy Kallam <siva.kallam@broadcom.com>
Cc: Prashant Sreedharan <prashant@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c