فهرست منبع

qcacmn: replace complete_and_exit with kthread_complete_and_exit

In kernel 5.17, complete_and_exit is replaced with
kthread_complete_and_exit. So if kernel version is >= 5.17,
then use kthread_complete_and_exit.

Change-Id: I4e9a98373197eba4931a8dafe77040448ffb40eb
CRs-Fixed: 3297481
Rajesh Chauhan 2 سال پیش
والد
کامیت
c85603d008
2فایلهای تغییر یافته به همراه21 افزوده شده و 2 حذف شده
  1. 11 1
      hif/src/sdio/transfer/mailbox.c
  2. 10 1
      utils/logging/src/wlan_logging_sock_svc.c

+ 11 - 1
hif/src/sdio/transfer/mailbox.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -44,6 +45,15 @@
 #include "regtable.h"
 #include "transfer.h"
 
+/*
+ * The following commit was introduced in v5.17:
+ * cead18552660 ("exit: Rename complete_and_exit to kthread_complete_and_exit")
+ * Use the old name for kernels before 5.17
+ */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0))
+#define kthread_complete_and_exit(c, s) complete_and_exit(c, s)
+#endif
+
 /* by default setup a bounce buffer for the data packets,
  * if the underlying host controller driver
  * does not use DMA you may be able to skip this step
@@ -1887,7 +1897,7 @@ static int async_task(void *param)
 		}
 	}
 
-	complete_and_exit(&device->async_completion, 0);
+	kthread_complete_and_exit(&device->async_completion, 0);
 
 	return 0;
 }

+ 10 - 1
utils/logging/src/wlan_logging_sock_svc.c

@@ -64,6 +64,15 @@
 #include <cdp_txrx_misc.h>
 #endif
 
+/*
+ * The following commit was introduced in v5.17:
+ * cead18552660 ("exit: Rename complete_and_exit to kthread_complete_and_exit")
+ * Use the old name for kernels before 5.17
+ */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0))
+#define kthread_complete_and_exit(c, s) complete_and_exit(c, s)
+#endif
+
 #define MAX_NUM_PKT_LOG 32
 
 #define LOGGING_TRACE(level, args ...) \
@@ -923,7 +932,7 @@ static int wlan_logging_thread(void *Arg)
 			  &gwlan_logging.eventFlag);
 	}
 
-	complete_and_exit(&gwlan_logging.shutdown_comp, 0);
+	kthread_complete_and_exit(&gwlan_logging.shutdown_comp, 0);
 
 	return 0;
 }