From 6510531b81c7a0c3b3c6b9eee2ff456e6d9aac6d Mon Sep 17 00:00:00 2001 From: phadiman Date: Thu, 3 Sep 2020 18:31:48 +0530 Subject: [PATCH] qcacmn: Remove dp_tx_pdev_detach API dp_tx_pdev_detach API takes care of flushing tx descriptors and multicast enhancement mem cleanup dp_pdev_deinit takes care of cleaning up the above actions and dp_tx_pdev_detach is simply a redundant piece of code Hence remove dp_tx_pdev_detach API and call dp_tx_desc_flush directly from dp_pdev_deinit CRs-Fixed: 2769303 Change-Id: Ic798793e81eefc7dc905ca7552fdca13e9fddd8c --- dp/wifi3.0/dp_main.c | 2 +- dp/wifi3.0/dp_tx.c | 15 --------------- dp/wifi3.0/dp_tx.h | 2 -- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 5fb4d435e5..773f543db9 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -4276,7 +4276,7 @@ static void dp_pdev_deinit(struct cdp_pdev *txrx_pdev, int force) qdf_nbuf_free(pdev->sojourn_buf); dp_pdev_flush_pending_vdevs(pdev); - dp_tx_pdev_detach(pdev); + dp_tx_desc_flush(pdev, NULL, true); dp_pktlogmod_exit(pdev); dp_neighbour_peers_detach(pdev); diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 1d9d85e7b7..4c9be42051 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -4549,21 +4549,6 @@ QDF_STATUS dp_tx_pdev_init(struct dp_pdev *pdev) return QDF_STATUS_SUCCESS; } -/** - * dp_tx_pdev_detach() - detach pdev from dp tx - * @pdev: physical device instance - * - * Return: QDF_STATUS_SUCCESS: success - * QDF_STATUS_E_RESOURCES: Error return - */ -QDF_STATUS dp_tx_pdev_detach(struct dp_pdev *pdev) -{ - /* flush TX outstanding data per pdev */ - dp_tx_desc_flush(pdev, NULL, true); - dp_tx_me_exit(pdev); - return QDF_STATUS_SUCCESS; -} - #ifdef QCA_LL_TX_FLOW_CONTROL_V2 /* Pools will be allocated dynamically */ static QDF_STATUS dp_tx_alloc_static_pools(struct dp_soc *soc, int num_pool, diff --git a/dp/wifi3.0/dp_tx.h b/dp/wifi3.0/dp_tx.h index c9b8da1ab3..34fc3f3abd 100644 --- a/dp/wifi3.0/dp_tx.h +++ b/dp/wifi3.0/dp_tx.h @@ -188,8 +188,6 @@ QDF_STATUS dp_tx_tso_cmn_desc_pool_alloc(struct dp_soc *soc, QDF_STATUS dp_tx_tso_cmn_desc_pool_init(struct dp_soc *soc, uint8_t num_pool, uint16_t num_desc); -QDF_STATUS dp_tx_pdev_detach(struct dp_pdev *pdev); -QDF_STATUS dp_tx_pdev_attach(struct dp_pdev *pdev); void dp_tx_tso_cmn_desc_pool_deinit(struct dp_soc *soc, uint8_t num_pool); void dp_tx_tso_cmn_desc_pool_free(struct dp_soc *soc, uint8_t num_pool);