]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: mac80211: use jiffies_delta_to_msecs() for sta_info inactive times
authorNicolas Cavallari <nicolas.cavallari@green-communications.fr>
Tue, 3 Mar 2026 16:06:39 +0000 (17:06 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 6 Mar 2026 10:06:27 +0000 (11:06 +0100)
commitac6f24cc9c0a9aefa55ec9696dcafa971d4d760b
tree5e22aea284bb593c461cfe9c4bc77287e54a4026
parent708bbb45537780a8d3721ca1e0cf1932c1d1bf5f
wifi: mac80211: use jiffies_delta_to_msecs() for sta_info inactive times

Inactive times of around 0xffffffff milliseconds have been observed on
an ath9k device on ARM.  This is likely due to a memory ordering race in
the jiffies_to_msecs(jiffies - last_active()) calculation causing an
overflow when the observed jiffies is below ieee80211_sta_last_active().

Use jiffies_delta_to_msecs() instead to avoid this problem.

Fixes: 7bbdd2d98797 ("mac80211: implement station stats retrieval")
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Link: https://patch.msgid.link/20260303161701.31808-1-nicolas.cavallari@green-communications.fr
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/sta_info.c