]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: cfg80211: add an hrtimer based delayed work item
authorBenjamin Berg <benjamin.berg@intel.com>
Tue, 28 Oct 2025 10:58:37 +0000 (12:58 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 28 Oct 2025 13:56:30 +0000 (14:56 +0100)
commit7ceba45a6658ce637da334cd0ebf27f4ede6c0fe
treea9f9f257963f41585ca0c05bc020b93a6436bf4d
parent3b8694e56f6b69aaba1cffdf0c0760cd76712422
wifi: cfg80211: add an hrtimer based delayed work item

The normal timer mechanism assume that timeout further in the future
need a lower accuracy. As an example, the granularity for a timer
scheduled 4096 ms in the future on a 1000 Hz system is already 512 ms.
This granularity is perfectly sufficient for e.g. timeouts, but there
are other types of events that will happen at a future point in time and
require a higher accuracy.

Add a new wiphy_hrtimer_work type that uses an hrtimer internally. The
API is almost identical to the existing wiphy_delayed_work and it can be
used as a drop-in replacement after minor adjustments. The work will be
scheduled relative to the current time with a slack of 1 millisecond.

CC: stable@vger.kernel.org # 6.4+
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20251028125710.7f13a2adc5eb.I01b5af0363869864b0580d9c2a1770bafab69566@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/core.c
net/wireless/trace.h