]> git.baikalelectronics.ru Git - kernel.git/commit
rt2x00: use monotonic timestamps for frame dump
authorArnd Bergmann <arnd@arndb.de>
Mon, 6 Nov 2017 14:03:59 +0000 (15:03 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 10 Nov 2017 02:33:05 +0000 (04:33 +0200)
commit305af521ec868ffe90b0bc5a1ef76ae88fdfb989
treeede04e02c6dd51686f67109f5e5eadefc9e87212
parent65ea4611a05f732997df155f1ba19583c88d11eb
rt2x00: use monotonic timestamps for frame dump

rt2x00 uses the deprecated do_gettimeofday() function to get a timestamp
for its debugfs "dump" file interface.

The timestamp is using an unsigned 32-bit value, so we could make it
work until 2106 by using ktime_get_real_ts64(), but it seems better to
use monotonic times, as we normally want for timestamps.

Since this is an interface change, I'm incrementing the
DUMP_HEADER_VERSION number, so user space can figure out whether the
timestamps are monotonic or not. Most likely the tools won't care either
way.

Generally speaking, ABI version numbers and in particular changing them
is a bad idea. However since this is in debugfs, we don't put any
API stability rules on the interface according to
Documentation/filesystems/debugfs.txt, and we can take the easy way
out here; anyone using the frame dump feature can probably work out
the differences here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
drivers/net/wireless/ralink/rt2x00/rt2x00dump.h