From 7a4721f3abb14e5410d892672312f79b32f700ac Mon Sep 17 00:00:00 2001 From: "Pamidipati, Vijay" Date: Mon, 8 Jan 2018 23:10:05 +0530 Subject: [PATCH] qcacmn: Free Tx ME pool in detach path Tx ME descriptors used for Tx Multicast enhancement are not freed in pdev detach path causing memory leak. Fix this by freeing them in pdev detach path. Change-Id: I902e7a829495871e3d0013a9942f86c02bbba80e CRs-Fixed: 2168524 --- dp/wifi3.0/dp_tx.c | 2 +- dp/wifi3.0/dp_tx.h | 10 +++++++++- dp/wifi3.0/dp_tx_me.c | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index a4807c7dfc..9ea1adf0e3 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -2718,7 +2718,7 @@ QDF_STATUS dp_tx_pdev_attach(struct dp_pdev *pdev) */ QDF_STATUS dp_tx_pdev_detach(struct dp_pdev *pdev) { - /* What should do here? */ + dp_tx_me_exit(pdev); return QDF_STATUS_SUCCESS; } diff --git a/dp/wifi3.0/dp_tx.h b/dp/wifi3.0/dp_tx.h index 4c6276ca6f..263df96f77 100644 --- a/dp/wifi3.0/dp_tx.h +++ b/dp/wifi3.0/dp_tx.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 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 @@ -175,6 +175,14 @@ static inline void dp_non_std_tx_comp_free_buff(struct dp_tx_desc_s *tx_desc, void dp_tx_mec_handler(struct dp_vdev *vdev, uint8_t *status); #endif +#ifdef ATH_SUPPORT_IQUE +void dp_tx_me_exit(struct dp_pdev *pdev); +#else +static inline void dp_tx_me_exit(struct dp_pdev *pdev) +{ + return; +} +#endif #ifdef FEATURE_PERPKT_INFO QDF_STATUS diff --git a/dp/wifi3.0/dp_tx_me.c b/dp/wifi3.0/dp_tx_me.c index 38e182b3ed..d4c4dfa51c 100644 --- a/dp/wifi3.0/dp_tx_me.c +++ b/dp/wifi3.0/dp_tx_me.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-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 @@ -118,7 +118,7 @@ dp_tx_me_alloc_descriptor(struct cdp_pdev *pdev_handle) * * Return:void */ -static inline void +void dp_tx_me_exit(struct dp_pdev *pdev) { /* Add flow control buffer count */