Skip to content
  • Arnd Bergmann's avatar
    cfg80211: track time using boottime · fe0984d3
    Arnd Bergmann authored
    
    
    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: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    fe0984d3