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 5
5
#include <linux/ptp_clock_kernel.h>
6
6
7
7
static int ath9k_phc_adjfine (struct ptp_clock_info * ptp , long scaled_ppm ) {
8
- #if 0
9
8
struct ath_softc * sc = container_of (ptp , struct ath_softc , ptp_clock_info );
10
9
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 );
23
10
24
11
spin_lock_irqsave (& sc -> systim_lock , flags );
25
12
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 ) ;
27
14
spin_unlock_irqrestore (& sc -> systim_lock , flags );
28
15
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 );
31
17
32
18
return 0 ;
33
19
}
You can’t perform that action at this time.
0 commit comments