summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hif/src/ce/ce_main.c2
-rw-r--r--hif/src/ce/ce_tasklet.c18
-rw-r--r--hif/src/ce/ce_tasklet.h3
3 files changed, 21 insertions, 2 deletions
diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c
index 6fbd121cd1ac..458fff0afb8b 100644
--- a/hif/src/ce/ce_main.c
+++ b/hif/src/ce/ce_main.c
@@ -2306,6 +2306,7 @@ void hif_unconfig_ce(struct hif_softc *hif_sc)
int pipe_num;
struct HIF_CE_pipe_info *pipe_info;
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(hif_sc);
+ struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(hif_sc);
for (pipe_num = 0; pipe_num < hif_sc->ce_count; pipe_num++) {
pipe_info = &hif_state->pipe_info[pipe_num];
@@ -2318,6 +2319,7 @@ void hif_unconfig_ce(struct hif_softc *hif_sc)
qdf_spinlock_destroy(&pipe_info->recv_bufs_needed_lock);
}
}
+ deinit_tasklet_workers(hif_hdl);
if (hif_sc->athdiag_procfs_inited) {
athdiag_procfs_remove();
hif_sc->athdiag_procfs_inited = false;
diff --git a/hif/src/ce/ce_tasklet.c b/hif/src/ce/ce_tasklet.c
index 625bbc776d0c..462b43495843 100644
--- a/hif/src/ce/ce_tasklet.c
+++ b/hif/src/ce/ce_tasklet.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2018 The Linux Foundation. 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
@@ -111,6 +111,22 @@ void init_tasklet_workers(struct hif_opaque_softc *scn)
work_initialized = true;
}
+/**
+ * deinit_tasklet_workers() - deinit_tasklet_workers
+ * @scn: HIF Context
+ *
+ * Return: N/A
+ */
+void deinit_tasklet_workers(struct hif_opaque_softc *scn)
+{
+ u32 id;
+
+ for (id = 0; id < CE_ID_MAX; id++)
+ cancel_work_sync(&tasklet_workers[id].work);
+
+ work_initialized = false;
+}
+
#ifdef CONFIG_SLUB_DEBUG_ON
/**
* ce_schedule_tasklet() - schedule ce tasklet
diff --git a/hif/src/ce/ce_tasklet.h b/hif/src/ce/ce_tasklet.h
index 93287ae6cfc2..05da16872781 100644
--- a/hif/src/ce/ce_tasklet.h
+++ b/hif/src/ce/ce_tasklet.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2016,2018 The Linux Foundation. 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
@@ -20,6 +20,7 @@
#define __CE_TASKLET_H__
#include "ce_main.h"
void init_tasklet_workers(struct hif_opaque_softc *scn);
+void deinit_tasklet_workers(struct hif_opaque_softc *scn);
void ce_tasklet_init(struct HIF_CE_state *hif_ce_state, uint32_t mask);
void ce_tasklet_kill(struct hif_softc *scn);
int hif_drain_tasklets(struct hif_softc *scn);