You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wifi: mt76: add kernel version compatibility for timer APIs
Add version checks to support both old and new timer APIs across
different kernel versions:
- Use timer_delete_sync() on kernels >= 6.1, fall back to
del_timer_sync() on older kernels. The timer_delete_sync() function
was introduced in kernel 6.1 as a replacement for del_timer_sync().
- Use from_timer() for timer callbacks on kernels >= 4.15, fall back
to container_of() on older kernels. The from_timer() macro was
introduced in kernel 4.15 as part of the timer API modernization.
- Use hrtimer_setup() on kernels >= 4.15, fall back to manual
hrtimer_init() and function assignment on older kernels. The
hrtimer_setup() helper was introduced alongside the timer callback
changes in kernel 4.15.
- Use timer_container_of() on kernels >= 6.16, from_timer() for 4.14 -
6.15, and container_of() for older kernels.
Signed-off-by: John Audia <therealgraysky@proton.me>
0 commit comments