diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 14e5396804..c0ed69d318 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -2509,8 +2509,8 @@ static void dp_soc_detach_wifi3(void *txrx_soc) qdf_atomic_set(&soc->cmn_init_done, 0); - qdf_flush_work(0, &soc->htt_stats.work); - qdf_disable_work(0, &soc->htt_stats.work); + qdf_flush_work(&soc->htt_stats.work); + qdf_disable_work(&soc->htt_stats.work); /* Free pending htt stats messages */ qdf_nbuf_queue_free(&soc->htt_stats.msg); diff --git a/qdf/inc/qdf_defer.h b/qdf/inc/qdf_defer.h index 2fe3088752..a7f3a4851d 100644 --- a/qdf/inc/qdf_defer.h +++ b/qdf/inc/qdf_defer.h @@ -61,38 +61,35 @@ typedef __qdf_bh_t qdf_bh_t; /** * qdf_create_bh - creates the bottom half deferred handler - * @hdl: os handle * @bh: pointer to bottom * @func: deferred function to run at bottom half interrupt context. * @arg: argument for the deferred function * Return: none */ -static inline void qdf_create_bh(qdf_handle_t hdl, qdf_bh_t *bh, - qdf_defer_fn_t func, void *arg) +static inline void +qdf_create_bh(qdf_bh_t *bh, qdf_defer_fn_t func, void *arg) { - __qdf_init_bh(hdl, bh, func, arg); + __qdf_init_bh(bh, func, arg); } /** * qdf_sched - schedule a bottom half (DPC) - * @hdl: OS handle * @bh: pointer to bottom * Return: none */ -static inline void qdf_sched_bh(qdf_handle_t hdl, qdf_bh_t *bh) +static inline void qdf_sched_bh(qdf_bh_t *bh) { - __qdf_sched_bh(hdl, bh); + __qdf_sched_bh(bh); } /** * qdf_destroy_bh - destroy the bh (synchronous) - * @hdl: OS handle * @bh: pointer to bottom * Return: none */ -static inline void qdf_destroy_bh(qdf_handle_t hdl, qdf_bh_t *bh) +static inline void qdf_destroy_bh(qdf_bh_t *bh) { - __qdf_disable_bh(hdl, bh); + __qdf_disable_bh(bh); } /*********************Non-Interrupt Context deferred Execution***************/ @@ -110,23 +107,22 @@ static inline void qdf_destroy_bh(qdf_handle_t hdl, qdf_bh_t *bh) static inline QDF_STATUS qdf_create_work(qdf_handle_t hdl, qdf_work_t *work, qdf_defer_fn_t func, void *arg) { - return __qdf_init_work(hdl, work, func, arg); + return __qdf_init_work(work, func, arg); } /** * qdf_create_delayed_work - create a delayed work/task, This runs in * non-interrupt context, so can be preempted by H/W & S/W intr - * @hdl: OS handle * @work: pointer to work * @func: deferred function to run at bottom half non-interrupt context. * @arg: argument for the deferred function * Return: none */ -static inline void qdf_create_delayed_work(qdf_handle_t hdl, - qdf_delayed_work_t *work, - qdf_defer_fn_t func, void *arg) +static inline void qdf_create_delayed_work(qdf_delayed_work_t *work, + qdf_defer_fn_t func, + void *arg) { - __qdf_init_delayed_work(hdl, work, func, arg); + __qdf_init_delayed_work(work, func, arg); } /** @@ -165,23 +161,21 @@ static inline qdf_workqueue_t *qdf_create_singlethread_workqueue(char *name) static inline void qdf_queue_work(qdf_handle_t hdl, qdf_workqueue_t *wqueue, qdf_work_t *work) { - return __qdf_queue_work(hdl, wqueue, work); + return __qdf_queue_work(wqueue, work); } /** * qdf_queue_delayed_work - Queue the delayed work/task - * @hdl: OS handle * @wqueue: pointer to workqueue * @work: pointer to work * @delay: delay interval in milliseconds * Return: none */ -static inline void qdf_queue_delayed_work(qdf_handle_t hdl, - qdf_workqueue_t *wqueue, +static inline void qdf_queue_delayed_work(qdf_workqueue_t *wqueue, qdf_delayed_work_t *work, uint32_t delay) { - return __qdf_queue_delayed_work(hdl, wqueue, work, delay); + return __qdf_queue_delayed_work(wqueue, work, delay); } /** @@ -193,7 +187,7 @@ static inline void qdf_queue_delayed_work(qdf_handle_t hdl, static inline void qdf_flush_workqueue(qdf_handle_t hdl, qdf_workqueue_t *wqueue) { - return __qdf_flush_workqueue(hdl, wqueue); + return __qdf_flush_workqueue(wqueue); } /** @@ -205,7 +199,7 @@ static inline void qdf_flush_workqueue(qdf_handle_t hdl, static inline void qdf_destroy_workqueue(qdf_handle_t hdl, qdf_workqueue_t *wqueue) { - return __qdf_destroy_workqueue(hdl, wqueue); + return __qdf_destroy_workqueue(wqueue); } /** @@ -216,26 +210,23 @@ static inline void qdf_destroy_workqueue(qdf_handle_t hdl, */ static inline void qdf_sched_work(qdf_handle_t hdl, qdf_work_t *work) { - __qdf_sched_work(hdl, work); + __qdf_sched_work(work); } /** * qdf_sched_delayed_work() - Schedule a delayed task - * @hdl: OS handle * @work: pointer to delayed work * @delay: delay interval in milliseconds * Return: none */ -static inline void qdf_sched_delayed_work(qdf_handle_t hdl, - qdf_delayed_work_t *work, - uint32_t delay) +static inline void +qdf_sched_delayed_work(qdf_delayed_work_t *work, uint32_t delay) { - __qdf_sched_delayed_work(hdl, work, delay); + __qdf_sched_delayed_work(work, delay); } /** * qdf_cancel_work() - Cancel a work - * @hdl: OS handle * @work: pointer to work * * Cancel work and wait for its execution to finish. @@ -248,30 +239,26 @@ static inline void qdf_sched_delayed_work(qdf_handle_t hdl, * * Return: true if work was pending, false otherwise */ -static inline bool qdf_cancel_work(qdf_handle_t hdl, - qdf_work_t *work) +static inline bool qdf_cancel_work(qdf_work_t *work) { - return __qdf_cancel_work(hdl, work); + return __qdf_cancel_work(work); } /** * qdf_cancel_delayed_work() - Cancel a delayed work - * @hdl: OS handle * @work: pointer to delayed work * * This is qdf_cancel_work for delayed works. * * Return: true if work was pending, false otherwise */ -static inline bool qdf_cancel_delayed_work(qdf_handle_t hdl, - qdf_delayed_work_t *work) +static inline bool qdf_cancel_delayed_work(qdf_delayed_work_t *work) { - return __qdf_cancel_delayed_work(hdl, work); + return __qdf_cancel_delayed_work(work); } /** * qdf_flush_work - Flush a deferred task on non-interrupt context - * @hdl: OS handle * @work: pointer to work * * Wait until work has finished execution. work is guaranteed to be @@ -279,35 +266,32 @@ static inline bool qdf_cancel_delayed_work(qdf_handle_t hdl, * * Return: none */ -static inline void qdf_flush_work(qdf_handle_t hdl, qdf_work_t *work) +static inline void qdf_flush_work(qdf_work_t *work) { - __qdf_flush_work(hdl, work); + __qdf_flush_work(work); } /** * qdf_flush_delayed_work() - Flush a delayed work - * @hdl: OS handle * @work: pointer to delayed work * * This is qdf_flush_work for delayed works. * * Return: none */ -static inline void qdf_flush_delayed_work(qdf_handle_t hdl, - qdf_delayed_work_t *work) +static inline void qdf_flush_delayed_work(qdf_delayed_work_t *work) { - __qdf_flush_delayed_work(hdl, work); + __qdf_flush_delayed_work(work); } /** * qdf_disable_work - disable the deferred task (synchronous) - * @hdl: OS handle * @work: pointer to work * Return: unsigned int */ -static inline uint32_t qdf_disable_work(qdf_handle_t hdl, qdf_work_t *work) +static inline uint32_t qdf_disable_work(qdf_work_t *work) { - return __qdf_disable_work(hdl, work); + return __qdf_disable_work(work); } /** @@ -318,7 +302,7 @@ static inline uint32_t qdf_disable_work(qdf_handle_t hdl, qdf_work_t *work) */ static inline void qdf_destroy_work(qdf_handle_t hdl, qdf_work_t *work) { - __qdf_disable_work(hdl, work); + __qdf_disable_work(work); } #endif /*_QDF_DEFER_H*/ diff --git a/qdf/linux/src/i_qdf_defer.h b/qdf/linux/src/i_qdf_defer.h index 431bb29e47..defa618fc8 100644 --- a/qdf/linux/src/i_qdf_defer.h +++ b/qdf/linux/src/i_qdf_defer.h @@ -82,15 +82,13 @@ typedef void (*__qdf_bh_fn_t)(unsigned long arg); /** * __qdf_init_work - Initialize a work/task queue, This runs in non-interrupt * context, so can be preempted by H/W & S/W intr - * @hdl: OS handle * @work: pointer to work * @func: deferred function to run at bottom half non-interrupt context. * @arg: argument for the deferred function * Return: none */ -static inline QDF_STATUS __qdf_init_work(qdf_handle_t hdl, - __qdf_work_t *work, - qdf_defer_fn_t func, void *arg) +static inline QDF_STATUS +__qdf_init_work(__qdf_work_t *work, qdf_defer_fn_t func, void *arg) { /*Initilize func and argument in work struct */ INIT_WORK(&work->work, __qdf_defer_func); @@ -100,15 +98,14 @@ static inline QDF_STATUS __qdf_init_work(qdf_handle_t hdl, /** * __qdf_init_delayed_work - create a work/task, This runs in non-interrupt * context, so can be preempted by H/W & S/W intr - * @hdl: OS handle * @work: pointer to work * @func: deferred function to run at bottom half non-interrupt context. * @arg: argument for the deferred function * Return: none */ -static inline uint32_t __qdf_init_delayed_work(qdf_handle_t hdl, - __qdf_delayed_work_t *work, - qdf_defer_fn_t func, void *arg) +static inline uint32_t __qdf_init_delayed_work(__qdf_delayed_work_t *work, + qdf_defer_fn_t func, + void *arg) { INIT_WORK(work, func, arg); return QDF_STATUS_SUCCESS; @@ -116,28 +113,24 @@ static inline uint32_t __qdf_init_delayed_work(qdf_handle_t hdl, /** * __qdf_queue_work - Queue the work/task - * @hdl: OS handle * @wqueue: pointer to workqueue * @work: pointer to work * Return: none */ -static inline void __qdf_queue_work(qdf_handle_t hdl, - __qdf_workqueue_t *wqueue, - __qdf_work_t *work) +static inline void +__qdf_queue_work(__qdf_workqueue_t *wqueue, __qdf_work_t *work) { queue_work(wqueue, work); } /** * __qdf_queue_delayed_work - Queue the delayed work/task - * @hdl: OS handle * @wqueue: pointer to workqueue * @work: pointer to work * @delay: delay interval * Return: none */ -static inline void __qdf_queue_delayed_work(qdf_handle_t hdl, - __qdf_workqueue_t *wqueue, +static inline void __qdf_queue_delayed_work(__qdf_workqueue_t *wqueue, __qdf_delayed_work_t *work, uint32_t delay) { @@ -146,11 +139,10 @@ static inline void __qdf_queue_delayed_work(qdf_handle_t hdl, /** * __qdf_sched_work - Schedule a deferred task on non-interrupt context - * @hdl: OS handle * @work: pointer to work * Retrun: none */ -static inline QDF_STATUS __qdf_sched_work(qdf_handle_t hdl, __qdf_work_t *work) +static inline QDF_STATUS __qdf_sched_work(__qdf_work_t *work) { schedule_work(work); return QDF_STATUS_SUCCESS; @@ -158,14 +150,12 @@ static inline QDF_STATUS __qdf_sched_work(qdf_handle_t hdl, __qdf_work_t *work) /** * __qdf_sched_delayed_work() - Schedule a delayed work - * @hdl: OS handle * @work: pointer to delayed work * @delay: delay interval * Return: none */ -static inline QDF_STATUS __qdf_sched_delayed_work(qdf_handle_t hdl, - __qdf_delayed_work_t *work, - uint32_t delay) +static inline QDF_STATUS +__qdf_sched_delayed_work(__qdf_delayed_work_t *work, uint32_t delay) { schedule_delayed_work(work, msecs_to_jiffies(delay)); return QDF_STATUS_SUCCESS; @@ -173,35 +163,30 @@ static inline QDF_STATUS __qdf_sched_delayed_work(qdf_handle_t hdl, /** * __qdf_cancel_work() - Cancel a work - * @hdl: OS handle * @work: pointer to work * Return: true if work was pending, false otherwise */ -static inline bool __qdf_cancel_work(qdf_handle_t hdl, - __qdf_work_t *work) +static inline bool __qdf_cancel_work(__qdf_work_t *work) { return cancel_work_sync(work); } /** * __qdf_cancel_delayed_work() - Cancel a delayed work - * @hdl: OS handle * @work: pointer to delayed work * Return: true if work was pending, false otherwise */ -static inline bool __qdf_cancel_delayed_work(qdf_handle_t hdl, - __qdf_delayed_work_t *work) +static inline bool __qdf_cancel_delayed_work(__qdf_delayed_work_t *work) { return cancel_delayed_work_sync(work); } /** * __qdf_flush_work - Flush a deferred task on non-interrupt context - * @hdl: OS handle * @work: pointer to work * Return: none */ -static inline uint32_t __qdf_flush_work(qdf_handle_t hdl, __qdf_work_t *work) +static inline uint32_t __qdf_flush_work(__qdf_work_t *work) { flush_work(work); return QDF_STATUS_SUCCESS; @@ -209,21 +194,18 @@ static inline uint32_t __qdf_flush_work(qdf_handle_t hdl, __qdf_work_t *work) /** * __qdf_flush_delayed_work() - Flush a delayed work - * @hdl: OS handle * @work: pointer to delayed work * Return: none */ -static inline uint32_t __qdf_flush_delayed_work(qdf_handle_t hdl, - __qdf_delayed_work_t *work) +static inline uint32_t __qdf_flush_delayed_work(__qdf_delayed_work_t *work) { flush_delayed_work(work); return QDF_STATUS_SUCCESS; } #else -static inline QDF_STATUS __qdf_init_work(qdf_handle_t hdl, - __qdf_work_t *work, - qdf_defer_fn_t func, void *arg) +static inline QDF_STATUS +__qdf_init_work(__qdf_work_t *work, qdf_defer_fn_t func, void *arg) { work->fn = func; work->arg = arg; @@ -231,9 +213,9 @@ static inline QDF_STATUS __qdf_init_work(qdf_handle_t hdl, return QDF_STATUS_SUCCESS; } -static inline uint32_t __qdf_init_delayed_work(qdf_handle_t hdl, - __qdf_delayed_work_t *work, - qdf_defer_fn_t func, void *arg) +static inline uint32_t __qdf_init_delayed_work(__qdf_delayed_work_t *work, + qdf_defer_fn_t func, + void *arg) { /*Initilize func and argument in work struct */ work->fn = func; @@ -242,54 +224,49 @@ static inline uint32_t __qdf_init_delayed_work(qdf_handle_t hdl, return QDF_STATUS_SUCCESS; } -static inline void __qdf_queue_work(qdf_handle_t hdl, - __qdf_workqueue_t *wqueue, - __qdf_work_t *work) +static inline void +__qdf_queue_work(__qdf_workqueue_t *wqueue, __qdf_work_t *work) { queue_work(wqueue, &work->work); } -static inline void __qdf_queue_delayed_work(qdf_handle_t hdl, - __qdf_workqueue_t *wqueue, +static inline void __qdf_queue_delayed_work(__qdf_workqueue_t *wqueue, __qdf_delayed_work_t *work, uint32_t delay) { queue_delayed_work(wqueue, &work->dwork, msecs_to_jiffies(delay)); } -static inline QDF_STATUS __qdf_sched_work(qdf_handle_t hdl, __qdf_work_t *work) +static inline QDF_STATUS __qdf_sched_work(__qdf_work_t *work) { schedule_work(&work->work); return QDF_STATUS_SUCCESS; } -static inline QDF_STATUS __qdf_sched_delayed_work(qdf_handle_t hdl, - __qdf_delayed_work_t *work, - uint32_t delay) +static inline QDF_STATUS +__qdf_sched_delayed_work(__qdf_delayed_work_t *work, uint32_t delay) { schedule_delayed_work(&work->dwork, msecs_to_jiffies(delay)); return QDF_STATUS_SUCCESS; } -static inline bool __qdf_cancel_work(qdf_handle_t hdl, - __qdf_work_t *work) +static inline bool __qdf_cancel_work(__qdf_work_t *work) { return cancel_work_sync(&work->work); } -static inline bool __qdf_cancel_delayed_work(qdf_handle_t hdl, - __qdf_delayed_work_t *work) +static inline bool __qdf_cancel_delayed_work(__qdf_delayed_work_t *work) { return cancel_delayed_work_sync(&work->dwork); } -static inline uint32_t __qdf_flush_work(qdf_handle_t hdl, __qdf_work_t *work) +static inline uint32_t __qdf_flush_work(__qdf_work_t *work) { flush_work(&work->work); return QDF_STATUS_SUCCESS; } -static inline uint32_t __qdf_flush_delayed_work(qdf_handle_t hdl, - __qdf_delayed_work_t *work) + +static inline uint32_t __qdf_flush_delayed_work(__qdf_delayed_work_t *work) { flush_delayed_work(&work->dwork); return QDF_STATUS_SUCCESS; @@ -325,39 +302,33 @@ static inline __qdf_workqueue_t *__qdf_create_singlethread_workqueue(char *name) /** * __qdf_flush_workqueue - flush the workqueue - * @hdl: OS handle * @wqueue: pointer to workqueue * Return: none */ -static inline void __qdf_flush_workqueue(qdf_handle_t hdl, - __qdf_workqueue_t *wqueue) +static inline void __qdf_flush_workqueue(__qdf_workqueue_t *wqueue) { flush_workqueue(wqueue); } /** * __qdf_destroy_workqueue - Destroy the workqueue - * @hdl: OS handle * @wqueue: pointer to workqueue * Return: none */ -static inline void __qdf_destroy_workqueue(qdf_handle_t hdl, - __qdf_workqueue_t *wqueue) +static inline void __qdf_destroy_workqueue(__qdf_workqueue_t *wqueue) { destroy_workqueue(wqueue); } /** * __qdf_init_bh - creates the Bottom half deferred handler - * @hdl: OS handle * @bh: pointer to bottom * @func: deferred function to run at bottom half interrupt context. * @arg: argument for the deferred function * Return: none */ -static inline QDF_STATUS __qdf_init_bh(qdf_handle_t hdl, - struct tasklet_struct *bh, - qdf_defer_fn_t func, void *arg) +static inline QDF_STATUS +__qdf_init_bh(struct tasklet_struct *bh, qdf_defer_fn_t func, void *arg) { tasklet_init(bh, (__qdf_bh_fn_t) func, (unsigned long)arg); return QDF_STATUS_SUCCESS; @@ -369,12 +340,10 @@ static inline QDF_STATUS __qdf_init_bh(qdf_handle_t hdl, /** * __qdf_sched_bh - schedule a bottom half (DPC) - * @hdl: OS handle * @bh: pointer to bottom * Return: none */ -static inline QDF_STATUS -__qdf_sched_bh(qdf_handle_t hdl, struct tasklet_struct *bh) +static inline QDF_STATUS __qdf_sched_bh(struct tasklet_struct *bh) { tasklet_schedule(bh); return QDF_STATUS_SUCCESS; @@ -382,12 +351,10 @@ __qdf_sched_bh(qdf_handle_t hdl, struct tasklet_struct *bh) /** * __qdf_disable_work - disable the deferred task (synchronous) - * @hdl: OS handle * @work: pointer to work * Return: unsigned int */ -static inline QDF_STATUS -__qdf_disable_work(qdf_handle_t hdl, __qdf_work_t *work) +static inline QDF_STATUS __qdf_disable_work(__qdf_work_t *work) { if (cancel_work_sync(&work->work)) return QDF_STATUS_E_ALREADY; @@ -397,12 +364,10 @@ __qdf_disable_work(qdf_handle_t hdl, __qdf_work_t *work) /** * __qdf_disable_bh - destroy the bh (synchronous) - * @hdl: OS handle * @bh: pointer to bottom * Return: none */ -static inline QDF_STATUS -__qdf_disable_bh(qdf_handle_t hdl, struct tasklet_struct *bh) +static inline QDF_STATUS __qdf_disable_bh(struct tasklet_struct *bh) { tasklet_kill(bh); return QDF_STATUS_SUCCESS; diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c index c20c548a72..c946988f87 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c @@ -365,7 +365,7 @@ QDF_STATUS policy_mgr_psoc_close(struct wlan_objmgr_psoc *psoc) } if (pm_ctx->sta_ap_intf_check_work_info) { - qdf_cancel_work(0, &pm_ctx->sta_ap_intf_check_work); + qdf_cancel_work(&pm_ctx->sta_ap_intf_check_work); qdf_mem_free(pm_ctx->sta_ap_intf_check_work_info); pm_ctx->sta_ap_intf_check_work_info = NULL; }