Skip to content

Commit 9e3e6b5

Browse files
authored
Merge pull request #77 from horseface1110/fix/timer-api-linux-6.15
vwifi: Use timer_delete_sync() on Linux >= 6.1.84 for scan timers
2 parents bb2350b + 58a1817 commit 9e3e6b5

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
@@ -1979,7 +1979,11 @@ static int vwifi_delete_interface(struct vwifi_vif *vif)
19791979

19801980
cancel_work_sync(&vif->ws_scan);
19811981
cancel_work_sync(&vif->ws_scan_timeout);
1982+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 84)
1983+
timer_delete_sync(&vif->scan_complete);
1984+
#else
19821985
del_timer_sync(&vif->scan_complete);
1986+
#endif
19831987

19841988
/* If there's a pending scan, call cfg80211_scan_done to finish it. */
19851989
if (vif->scan_request) {
@@ -1990,7 +1994,11 @@ static int vwifi_delete_interface(struct vwifi_vif *vif)
19901994
}
19911995

19921996
/* Make sure that no work is queued */
1997+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 84)
1998+
timer_delete_sync(&vif->scan_timeout);
1999+
#else
19932000
del_timer_sync(&vif->scan_timeout);
2001+
#endif
19942002
cancel_work_sync(&vif->ws_connect);
19952003
cancel_work_sync(&vif->ws_disconnect);
19962004

0 commit comments

Comments
 (0)