]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: track time using boottime
authorArnd Bergmann <arnd@arndb.de>
Mon, 18 Jun 2018 15:11:14 +0000 (17:11 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 29 Jun 2018 07:49:28 +0000 (09:49 +0200)
commit602018365e24117b7372411fd1b8c32b62c1f4cf
tree17567180d52ce42b221309252baa61aefdfd6961
parent6b97ee7cbe35b1e6a06c71879df98c35c4cdad40
cfg80211: track time using boottime

The cfg80211 layer uses get_seconds() to read the current time
in its supend handling. This function is deprecated because of the 32-bit
time_t overflow, and it can cause unexpected behavior when the time
changes due to settimeofday() calls or leap second updates.

In many cases, we want to use monotonic time instead, however cfg80211
explicitly tracks the time spent in suspend, so this changes the
driver over to use ktime_get_boottime_seconds(), which is slightly
slower, but not used in a fastpath here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.h
net/wireless/sysfs.c