From a2cdf2284ec26bedf313bf9cee0b3a76a91ac369 Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Tue, 20 Oct 2015 16:03:06 -0700 Subject: [PATCH] qcacld-3.0: Rename cdf_sched_work to cdf_schedule_work The api is clearer without the abreviation. The api is cleaner without an unused cdf_handle. Also remove unnecessary cdf_schedule_work api. cdf_create_work is also cleaner without cdf_handle. Change-Id: Id8c32596a92184d6768e2bc3210c308b44da2a57 CRs-Fixed: 935297 --- core/cdf/inc/cdf_defer.h | 25 +++++-------------------- core/cdf/src/i_cdf_defer.h | 13 +++---------- core/cds/src/cds_concurrency.c | 5 ++--- core/wma/src/wma_data.c | 12 +++++------- 4 files changed, 15 insertions(+), 40 deletions(-) diff --git a/core/cdf/inc/cdf_defer.h b/core/cdf/inc/cdf_defer.h index fa527f3b3dbc..829f350f6023 100644 --- a/core/cdf/inc/cdf_defer.h +++ b/core/cdf/inc/cdf_defer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2014, 2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -96,7 +96,6 @@ static inline void cdf_destroy_bh(cdf_handle_t hdl, cdf_bh_t *bh) /** * cdf_create_work() - create a work/task queue, This runs in non-interrupt * context, so can be preempted by H/W & S/W intr - * @hdl: OS handle * @work: Work instance * @func: Deferred function to run at bottom half non-interrupt * context @@ -105,34 +104,20 @@ static inline void cdf_destroy_bh(cdf_handle_t hdl, cdf_bh_t *bh) * Return: None */ static inline void -cdf_create_work(cdf_handle_t hdl, cdf_work_t *work, +cdf_create_work(cdf_work_t *work, cdf_defer_fn_t func, void *arg) { - __cdf_init_work(hdl, work, func, arg); + __cdf_init_work(work, func, arg); } /** * cdf_sched_work() - schedule a deferred task on non-interrupt context - * @hdl: OS handle * @work: Work instance * * Return: None */ -static inline void cdf_sched_work(cdf_handle_t hdl, cdf_work_t *work) +static inline void cdf_schedule_work(cdf_work_t *work) { - __cdf_sched_work(hdl, work); + __cdf_schedule_work(work); } - -/** - * cdf_destroy_work() - destroy the deferred task (synchronous) - * @hdl: OS handle - * @work: Work instance - * - * Return: None - */ -static inline void cdf_destroy_work(cdf_handle_t hdl, cdf_work_t *work) -{ - __cdf_disable_work(hdl, work); -} - #endif /*__CDF_DEFER_H*/ diff --git a/core/cdf/src/i_cdf_defer.h b/core/cdf/src/i_cdf_defer.h index fc9bd7796eae..a21b618f5434 100644 --- a/core/cdf/src/i_cdf_defer.h +++ b/core/cdf/src/i_cdf_defer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -52,8 +52,7 @@ typedef struct { extern void __cdf_defer_func(struct work_struct *work); static inline CDF_STATUS -__cdf_init_work(cdf_handle_t hdl, - __cdf_work_t *work, cdf_defer_fn_t func, void *arg) +__cdf_init_work(__cdf_work_t *work, cdf_defer_fn_t func, void *arg) { /*Initilize func and argument in work struct */ work->fn = func; @@ -66,18 +65,12 @@ __cdf_init_work(cdf_handle_t hdl, return CDF_STATUS_SUCCESS; } -static inline CDF_STATUS __cdf_sched_work(cdf_handle_t hdl, __cdf_work_t *work) +static inline CDF_STATUS __cdf_schedule_work(__cdf_work_t *work) { schedule_work(&work->work); return CDF_STATUS_SUCCESS; } -static inline CDF_STATUS -__cdf_disable_work(cdf_handle_t hdl, __cdf_work_t *work) -{ - return CDF_STATUS_SUCCESS; -} - static inline CDF_STATUS __cdf_init_bh(cdf_handle_t hdl, struct tasklet_struct *bh, cdf_defer_fn_t func, void *arg) diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index b29c4918196e..8f9dfb072398 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -6595,7 +6595,6 @@ void cds_force_sap_on_scc(eCsrRoamResult roam_result) #endif /* FEATURE_WLAN_FORCE_SAP_SCC */ #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH - /** * cds_check_sta_ap_concurrent_ch_intf() - Restart SAP in STA-AP case * @data: Pointer to STA adapter @@ -6677,10 +6676,10 @@ void cds_check_concurrent_intf_and_restart_sap(hdd_station_ctx_t *hdd_sta_ctx, operationChannel) #endif ) { - cdf_create_work(0, &hdd_ctx->sta_ap_intf_check_work, + cdf_create_work(&hdd_ctx->sta_ap_intf_check_work, cds_check_sta_ap_concurrent_ch_intf, (void *)adapter); - cdf_sched_work(0, &hdd_ctx->sta_ap_intf_check_work); + cdf_schedule_work(&hdd_ctx->sta_ap_intf_check_work); cds_info("Checking for Concurrent Change interference"); } } diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index 286df551ed02..2c2a41c4b843 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -888,11 +888,10 @@ wma_data_tx_ack_comp_hdlr(void *wma_context, cdf_nbuf_t netbuf, int32_t status) ack_work->sub_type = 0; ack_work->status = status; - cdf_create_work(0, &ack_work->ack_cmp_work, + cdf_create_work(&ack_work->ack_cmp_work, wma_data_tx_ack_work_handler, ack_work); - /* Schedule the Work */ - cdf_sched_work(0, &ack_work->ack_cmp_work); + cdf_schedule_work(&ack_work->ack_cmp_work); } } @@ -1564,12 +1563,11 @@ wma_mgmt_tx_ack_comp_hdlr(void *wma_context, cdf_nbuf_t netbuf, int32_t status) ack_work->sub_type = pFc->subType; ack_work->status = status; - cdf_create_work(0, &ack_work->ack_cmp_work, + cdf_create_work(&ack_work->ack_cmp_work, wma_mgmt_tx_ack_work_handler, ack_work); - /* Schedule the Work */ - cdf_sched_work(0, &ack_work->ack_cmp_work); + cdf_schedule_work(&ack_work->ack_cmp_work); } } }