From 6ca574196e53c2e22145d2e203dfc98a17432168 Mon Sep 17 00:00:00 2001 From: Himanshu Batra Date: Wed, 27 May 2020 09:35:59 +0530 Subject: [PATCH] qcacmn: Add TX support for Extended Mcopy mode Currently, mcopy mode delivers first msdu per-ppdu to upper layer, add support for Extended mcopy mode to deliver first msdu per-MPDU. Change-Id: I8f3f7fb023e9d9140d0be31520d34103a3505ebb CRs-Fixed: 2701514 --- dp/wifi3.0/dp_tx.c | 15 ++++++++++++--- dp/wifi3.0/dp_types.h | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index aab1544ca1..085c4886f5 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -2798,11 +2798,20 @@ dp_get_completion_indication_for_stack(struct dp_soc *soc, } if (pdev->mcopy_mode) { - if ((pdev->m_copy_id.tx_ppdu_id == ppdu_id) && - (pdev->m_copy_id.tx_peer_id == peer_id)) { - return QDF_STATUS_E_INVAL; + /* If mcopy is enabled and mcopy_mode is M_COPY deliver 1st MSDU + * per PPDU. If mcopy_mode is M_COPY_EXTENDED deliver 1st MSDU + * for each MPDU + */ + if (pdev->mcopy_mode == M_COPY) { + if ((pdev->m_copy_id.tx_ppdu_id == ppdu_id) && + (pdev->m_copy_id.tx_peer_id == peer_id)) { + return QDF_STATUS_E_INVAL; + } } + if (!first_msdu) + return QDF_STATUS_E_INVAL; + pdev->m_copy_id.tx_ppdu_id = ppdu_id; pdev->m_copy_id.tx_peer_id = peer_id; } diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index cb1ee84ca8..7d827cc477 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -1777,9 +1777,9 @@ struct dp_pdev { /* enable calculation of delay stats*/ bool delay_stats_flag; struct { - uint16_t tx_ppdu_id; + uint32_t tx_ppdu_id; uint16_t tx_peer_id; - uint16_t rx_ppdu_id; + uint32_t rx_ppdu_id; } m_copy_id; /* To check if PPDU Tx stats are enabled for Pktlog */