Skip to content

Commit 5b52fac

Browse files
committed
Use timer_delete_sync for Linux 6.1.84 and above
The del_timer_sync function was renamed to timer_delete_sync in Linux kernel version 6.1.84 as part of a naming consistency cleanup. While del_timer_sync remains available as a backward-compatible inline wrapper, it is discouraged for use in new code. This commit updates the version check to KERNEL_VERSION(6, 1, 84) and uses timer_delete_sync accordingly. ref: https://git.kernel.org/torvalds/c/9b13df3fb64ee95e2397585404e442afee2c7d4f https://git.kernel.org/torvalds/c/8fa7292fee5c5240402371ea89ab285ec856c916
1 parent 62a3dd8 commit 5b52fac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vwifi.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,11 @@ static int vwifi_delete_interface(struct vwifi_vif *vif)
19741974

19751975
cancel_work_sync(&vif->ws_scan);
19761976
cancel_work_sync(&vif->ws_scan_timeout);
1977+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
1978+
timer_delete_sync(&vif->scan_complete);
1979+
#else
19771980
del_timer_sync(&vif->scan_complete);
1981+
#endif
19781982

19791983
/* If there's a pending scan, call cfg80211_scan_done to finish it. */
19801984
if (vif->scan_request) {
@@ -1985,7 +1989,11 @@ static int vwifi_delete_interface(struct vwifi_vif *vif)
19851989
}
19861990

19871991
/* Make sure that no work is queued */
1992+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
1993+
timer_delete_sync(&vif->scan_timeout);
1994+
#else
19881995
del_timer_sync(&vif->scan_timeout);
1996+
#endif
19891997
cancel_work_sync(&vif->ws_connect);
19901998
cancel_work_sync(&vif->ws_disconnect);
19911999

0 commit comments

Comments
 (0)