diff --git a/core/cdf/src/cdf_memory.c b/core/cdf/src/cdf_memory.c index 197de54069dc..f32c56620f7f 100644 --- a/core/cdf/src/cdf_memory.c +++ b/core/cdf/src/cdf_memory.c @@ -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. * @@ -338,9 +338,6 @@ void cdf_mem_free(void *ptr) void *cdf_mem_malloc(size_t size) { int flags = GFP_KERNEL; -#ifdef CONFIG_WCNSS_MEM_PRE_ALLOC - void *pmem; -#endif void *memPtr = NULL; unsigned long time_before_kzalloc; @@ -353,6 +350,7 @@ void *cdf_mem_malloc(size_t size) #if defined(CONFIG_CNSS) && defined(CONFIG_WCNSS_MEM_PRE_ALLOC) if (size > WCNSS_PRE_ALLOC_GET_THRESHOLD) { + void *pmem; pmem = wcnss_prealloc_get(size); if (NULL != pmem) { memset(pmem, 0, size); diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 38ac21d3bfea..5d6cb265c65c 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -1725,6 +1725,28 @@ end: cdf_mem_free(op_msg); } +/** + * hdd_ipa_init_uc_op_work - init ipa uc op work + * @work: struct work_struct + * @work_handler: work_handler + * + * Return: none + */ +#ifdef CONFIG_CNSS +static void hdd_ipa_init_uc_op_work(struct work_struct *work, + work_func_t work_handler) +{ + cnss_init_work(work, work_handler); +} +#else +static void hdd_ipa_init_uc_op_work(struct work_struct *work, + work_func_t work_handler) +{ + INIT_WORK(work, work_handler); +} +#endif + + /** * hdd_ipa_uc_ol_init() - Initialize IPA uC offload * @hdd_ctx: Global HDD context @@ -1828,7 +1850,7 @@ static CDF_STATUS hdd_ipa_uc_ol_init(hdd_context_t *hdd_ctx) hdd_ipa_uc_op_event_handler, (void *)hdd_ctx); for (i = 0; i < HDD_IPA_UC_OPCODE_MAX; i++) { - cnss_init_work(&ipa_ctxt->uc_op_work[i].work, + hdd_ipa_init_uc_op_work(&ipa_ctxt->uc_op_work[i].work, hdd_ipa_uc_fw_op_event_handler); ipa_ctxt->uc_op_work[i].msg = NULL; } @@ -2305,6 +2327,27 @@ int hdd_ipa_set_perf_level(hdd_context_t *hdd_ctx, uint64_t tx_packets, return 0; } +/** + * hdd_ipa_init_uc_rm_work - init ipa uc resource manager work + * @work: struct work_struct + * @work_handler: work_handler + * + * Return: none + */ +#ifdef CONFIG_CNSS +static void hdd_ipa_init_uc_rm_work(struct work_struct *work, + work_func_t work_handler) +{ + cnss_init_work(work, work_handler); +} +#else +static void hdd_ipa_init_uc_rm_work(struct work_struct *work, + work_func_t work_handler) +{ + INIT_WORK(work, work_handler); +} +#endif + /** * hdd_ipa_setup_rm() - Setup IPA resource management * @hdd_ipa: Global HDD IPA context @@ -2319,7 +2362,8 @@ static int hdd_ipa_setup_rm(struct hdd_ipa_priv *hdd_ipa) if (!hdd_ipa_is_rm_enabled(hdd_ipa->hdd_ctx)) return 0; - cnss_init_work(&hdd_ipa->uc_rm_work.work, hdd_ipa_uc_rm_notify_defer); + hdd_ipa_init_uc_rm_work(&hdd_ipa->uc_rm_work.work, + hdd_ipa_uc_rm_notify_defer); memset(&create_params, 0, sizeof(create_params)); create_params.name = IPA_RM_RESOURCE_WLAN_PROD; create_params.reg_params.user_data = hdd_ipa; diff --git a/core/htc/htc_send.c b/core/htc/htc_send.c index cb3c57d642f8..2f2925cf624f 100644 --- a/core/htc/htc_send.c +++ b/core/htc/htc_send.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. * @@ -1313,7 +1313,7 @@ A_STATUS htc_send_data_pkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket, HTC_ENDPOINT *pEndpoint; HTC_FRAME_HDR *pHtcHdr; HTC_PACKET_QUEUE sendQueue; - cdf_nbuf_t netbuf; + cdf_nbuf_t netbuf = NULL; int tx_resources; A_STATUS status = A_OK; uint32_t data_attr = 0;