]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
bnxt: fix bnxt_hwrm_fw_set_time for y2038
authorArnd Bergmann <arnd@arndb.de>
Mon, 6 Nov 2017 14:04:39 +0000 (15:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Nov 2017 04:33:40 +0000 (13:33 +0900)
commit7dfaa7bc99498da1c6c4a48bee8d2d5265161a8c
treec957c9e22e6370243956f0fa9016f9cf748b97e1
parent96c623e51f1c40bf524decc48c6fac7ce5dd41f7
bnxt: fix bnxt_hwrm_fw_set_time for y2038

On 32-bit architectures, rtc_time_to_tm() returns incorrect results
in 2038 or later, and do_gettimeofday() is broken for the same reason.

This changes the code to use ktime_get_real_seconds() and time64_to_tm()
instead, both of them are 2038-safe, and we can also get rid of the
CONFIG_RTC_LIB dependency that way.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c