diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-11-06 14:55:36 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-11-08 14:33:05 +0200 |
commit | 3c92d5517af8eeab81da3aee4fc14faa198bbb8b (patch) | |
tree | dcd88b66e407eed762fb70148c49662561c63c35 /drivers/net/wireless/realtek/rtlwifi/rtl8821ae | |
parent | 3f2a162fab15aee243178b5308bb5d1206fc4043 (diff) | |
download | linux-stable-3c92d5517af8eeab81da3aee4fc14faa198bbb8b.tar.gz linux-stable-3c92d5517af8eeab81da3aee4fc14faa198bbb8b.tar.bz2 linux-stable-3c92d5517af8eeab81da3aee4fc14faa198bbb8b.zip |
rtlwifi: use ktime_get_real_seconds() for suspend time
do_gettimeofday() is deprecated and slower than necessary for the purpose
of reading the seconds. This changes rtl_op_suspend/resume to use
ktime_get_real_seconds() instead, which is simpler and avoids confusion
about whether it is y2038-safe or not.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8821ae')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c index 52f17bdbaaaf..5a5ce98acb0b 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c @@ -1373,8 +1373,7 @@ static void _rtl8821ae_get_wakeup_reason(struct ieee80211_hw *hw) ppsc->wakeup_reason = 0; - do_gettimeofday(&ts); - rtlhal->last_suspend_sec = ts.tv_sec; + rtlhal->last_suspend_sec = ktime_get_real_seconds(); switch (fw_reason) { case FW_WOW_V2_PTK_UPDATE_EVENT: |