summaryrefslogtreecommitdiff
path: root/net/wireless/core.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-06-18 18:11:14 +0300
committerJohannes Berg <johannes.berg@intel.com>2018-06-29 10:49:28 +0300
commitfe0984d38938249f3f11fc558a8845fc6f8a0105 (patch)
tree17567180d52ce42b221309252baa61aefdfd6961 /net/wireless/core.h
parent8ba6731ad4c7e9f612b2f7dae1b5ed6bfc884b67 (diff)
downloadlinux-fe0984d38938249f3f11fc558a8845fc6f8a0105.tar.xz
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>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r--net/wireless/core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 63eb1b5fdd04..7f52ef569320 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -76,7 +76,7 @@ struct cfg80211_registered_device {
struct cfg80211_scan_request *scan_req; /* protected by RTNL */
struct sk_buff *scan_msg;
struct list_head sched_scan_req_list;
- unsigned long suspend_at;
+ time64_t suspend_at;
struct work_struct scan_done_wk;
struct genl_info *cur_cmd_info;