File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed
drivers/net/wireless/ath/ath9k Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 55#include <linux/ptp_clock_kernel.h>
66
77static int ath9k_phc_adjfine (struct ptp_clock_info * ptp , long scaled_ppm ) {
8- #if 0
98 struct ath_softc * sc = container_of (ptp , struct ath_softc , ptp_clock_info );
109 unsigned long flags ;
11- int neg_adj = 0 ;
12- u32 mult , diff ;
13- u64 adj ;
14-
15- if (scaled_ppm < 0 ) {
16- neg_adj = -1 ;
17- scaled_ppm = - scaled_ppm ;
18- }
19- mult = sc -> cc_mult ;
20- adj = mult ;
21- adj *= scaled_ppm ;
22- diff = div_u64 (adj , 1000000000ULL );
2310
2411 spin_lock_irqsave (& sc -> systim_lock , flags );
2512 timecounter_read (& sc -> tc );
26- sc -> cc .mult = neg_adj ? mult - diff : mult + diff ;
13+ sc -> cc .mult = adjust_by_scaled_ppm ( sc -> cc_mult , scaled_ppm ) ;
2714 spin_unlock_irqrestore (& sc -> systim_lock , flags );
2815
29- ath_warn (ath9k_hw_common (sc -> sc_ah ), "phc adjust adj=%llu freq=%u\n" , adj , diff );
30- #endif
16+ ath_dbg (ath9k_hw_common (sc -> sc_ah ), CONFIG , "phc adjust scaled_ppm=%ld\n" , scaled_ppm );
3117
3218 return 0 ;
3319}
You can’t perform that action at this time.
0 commit comments