qcacld-3.0: 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: I8b5ed5bbeade9d2044e375695e6e15208e10147d
CRs-Fixed: 3297438
This commit is contained in:
Rajesh Chauhan
2022-09-21 22:49:54 -07:00
committed by Madan Koyyalamudi
父節點 ecd9fe67b8
當前提交 7a91ba9a6a
共有 2 個文件被更改,包括 21 次插入2 次删除

查看文件

@@ -27,6 +27,15 @@
#include "cfg_ucfg_api.h"
#include "wlan_mgmt_txrx_utils_api.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
void pkt_capture_mon(struct pkt_capture_cb_context *cb_ctx, qdf_nbuf_t msdu,
struct wlan_objmgr_vdev *vdev, uint16_t ch_freq)
{
@@ -325,7 +334,7 @@ static int pkt_capture_mon_thread(void *arg)
}
}
pkt_capture_debug("Exiting packet capture mon thread");
complete_and_exit(&mon_ctx->mon_shutdown, 0);
kthread_complete_and_exit(&mon_ctx->mon_shutdown, 0);
return 0;
}

查看文件

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2014-2021 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
@@ -40,6 +41,15 @@
#include <linux/sched/types.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
static spinlock_t ssr_protect_lock;
struct shutdown_notifier {
@@ -862,7 +872,7 @@ static int cds_ol_rx_thread(void *arg)
}
cds_debug("Exiting CDS OL rx thread");
complete_and_exit(&pSchedContext->ol_rx_shutdown, 0);
kthread_complete_and_exit(&pSchedContext->ol_rx_shutdown, 0);
return 0;
}