diff options
| -rw-r--r-- | core/cds/src/cds_sched.c | 10 | ||||
| -rw-r--r-- | core/wma/inc/wma_api.h | 2 | ||||
| -rw-r--r-- | core/wma/src/wma_main.c | 18 |
3 files changed, 22 insertions, 8 deletions
diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index 01ddbbd6bede..4208325d8d90 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1321,14 +1321,8 @@ void cds_sched_flush_mc_mqs(p_cds_sched_context pSchedContext) QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO, "%s: Freeing MC WMA MSG message type %d", __func__, pMsgWrapper->pVosMsg->type); - if (pMsgWrapper->pVosMsg->bodyptr) { - qdf_mem_free((void *)pMsgWrapper-> - pVosMsg->bodyptr); - } - pMsgWrapper->pVosMsg->bodyptr = NULL; - pMsgWrapper->pVosMsg->bodyval = 0; - pMsgWrapper->pVosMsg->type = 0; + wma_mc_discard_msg(pMsgWrapper->pVosMsg); } cds_core_return_msg(pSchedContext->pVContext, pMsgWrapper); } diff --git a/core/wma/inc/wma_api.h b/core/wma/inc/wma_api.h index a7aec929204d..52cb5b7d65ac 100644 --- a/core/wma/inc/wma_api.h +++ b/core/wma/inc/wma_api.h @@ -134,6 +134,8 @@ typedef void (*wma_peer_authorized_fp) (uint32_t vdev_id); QDF_STATUS wma_pre_start(void *cds_context); +void wma_mc_discard_msg(cds_msg_t *msg); + QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg); QDF_STATUS wma_start(void *cds_context); diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index dc0d99b5c955..4f85f29c0981 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -6288,6 +6288,24 @@ static QDF_STATUS wma_process_power_debug_stats_req(tp_wma_handle wma_handle) } #endif +void wma_mc_discard_msg(cds_msg_t *msg) +{ + switch (msg->type) { + case WMA_PROCESS_FW_EVENT: + qdf_nbuf_free(((wma_process_fw_event_params *)msg->bodyptr)-> + evt_buf); + break; + } + + if (msg->bodyptr) { + qdf_mem_free(msg->bodyptr); + } + + msg->bodyptr = NULL; + msg->bodyval = 0; + msg->type = 0; +} + /** * wma_mc_process_msg() - process wma messages and call appropriate function. * @cds_context: cds context |
