git: e56928111450 - stable/14 - iwlwifi: make mvm/d3.c compile again

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Tue, 29 Apr 2025 11:41:33 UTC
The branch stable/14 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=e569281114500b58e04d64891a884286295d4cae

commit e569281114500b58e04d64891a884286295d4cae
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-03-15 00:08:14 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-04-29 10:49:27 +0000

    iwlwifi: make mvm/d3.c compile again
    
    Given we currently do not ompile the file by default make it compile
    again after the last vendor import.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 52a43041d2a864961f0a1a109a7a7c4c6ebed918)
---
 sys/contrib/dev/iwlwifi/mvm/d3.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sys/contrib/dev/iwlwifi/mvm/d3.c b/sys/contrib/dev/iwlwifi/mvm/d3.c
index 0fbafd5f0dbb..11d9911eabb1 100644
--- a/sys/contrib/dev/iwlwifi/mvm/d3.c
+++ b/sys/contrib/dev/iwlwifi/mvm/d3.c
@@ -9,6 +9,7 @@
 #include <linux/fs.h>
 #if defined(__FreeBSD__)
 #include <linux/string.h>
+#include <linux/delay.h>
 #endif
 #include <net/cfg80211.h>
 #include <net/ipv6.h>
@@ -3702,7 +3703,11 @@ static ssize_t iwl_mvm_d3_test_read(struct file *file, char __user *user_buf,
 				break;
 		}
 
+#if defined(__linux__)
 		if (msleep_interruptible(100))
+#elif defined(__FreeBSD__)
+		if (linux_msleep_interruptible(100))
+#endif
 			break;
 
 		if (time_is_before_jiffies(end)) {
@@ -3756,7 +3761,11 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file)
 		while (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) &&
 		       remaining_time > 0) {
 			remaining_time--;
+#if defined(__linux__)
 			msleep(1000);
+#elif defined(__FreeBSD__)
+			linux_msleep(1000);
+#endif
 		}
 
 		if (remaining_time == 0)