diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-07-16 17:05:09 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2014-07-23 18:01:51 -0400 |
commit | 6438e0ddc870f282f7ad46c050c211063a574687 (patch) | |
tree | 38805047fd9814df56e289022f4c7154f05726ab | |
parent | f166e6dcb7225c4193bcda68c9346583ed78b186 (diff) |
wireless: ath9k: Get rid of timespec conversions
We have interfaces. Remove the open coded cruft. Reduces text size
along with the code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 2a8ed8375ec0..14b80b1b450c 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1734,7 +1734,6 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1734 | struct ath9k_hw_cal_data *caldata, bool fastcc) | 1734 | struct ath9k_hw_cal_data *caldata, bool fastcc) |
1735 | { | 1735 | { |
1736 | struct ath_common *common = ath9k_hw_common(ah); | 1736 | struct ath_common *common = ath9k_hw_common(ah); |
1737 | struct timespec ts; | ||
1738 | u32 saveLedState; | 1737 | u32 saveLedState; |
1739 | u32 saveDefAntenna; | 1738 | u32 saveDefAntenna; |
1740 | u32 macStaId1; | 1739 | u32 macStaId1; |
@@ -1784,8 +1783,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1784 | 1783 | ||
1785 | /* Save TSF before chip reset, a cold reset clears it */ | 1784 | /* Save TSF before chip reset, a cold reset clears it */ |
1786 | tsf = ath9k_hw_gettsf64(ah); | 1785 | tsf = ath9k_hw_gettsf64(ah); |
1787 | getrawmonotonic(&ts); | 1786 | usec = ktime_to_us(ktime_get_raw()); |
1788 | usec = ts.tv_sec * 1000000ULL + ts.tv_nsec / 1000; | ||
1789 | 1787 | ||
1790 | saveLedState = REG_READ(ah, AR_CFG_LED) & | 1788 | saveLedState = REG_READ(ah, AR_CFG_LED) & |
1791 | (AR_CFG_LED_ASSOC_CTL | AR_CFG_LED_MODE_SEL | | 1789 | (AR_CFG_LED_ASSOC_CTL | AR_CFG_LED_MODE_SEL | |
@@ -1818,8 +1816,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1818 | } | 1816 | } |
1819 | 1817 | ||
1820 | /* Restore TSF */ | 1818 | /* Restore TSF */ |
1821 | getrawmonotonic(&ts); | 1819 | usec = ktime_to_us(ktime_get_raw()) - usec; |
1822 | usec = ts.tv_sec * 1000000ULL + ts.tv_nsec / 1000 - usec; | ||
1823 | ath9k_hw_settsf64(ah, tsf + usec); | 1820 | ath9k_hw_settsf64(ah, tsf + usec); |
1824 | 1821 | ||
1825 | if (AR_SREV_9280_20_OR_LATER(ah)) | 1822 | if (AR_SREV_9280_20_OR_LATER(ah)) |