From 9748234151a6f3eb6302ef5bece48625276919e5 Mon Sep 17 00:00:00 2001 From: Venkateswara Swamy Bandaru Date: Thu, 16 Feb 2017 12:04:50 +0530 Subject: [PATCH] qcacmn: Add cdp support for external tx completion for mesh mode Added cdp support for external tx completion. In case of mesh mode per packet tx completion stats has to be filled in the meta header and external function has to be called for updating these stats. It is the responsibility of external function to free the buffer after reading the stats Change-Id: I45ba800acf9b4d6091cc3f9aafc67c1f1f00f379 CRs-Fixed: 2003389 --- dp/inc/cdp_txrx_cmn_struct.h | 7 +++++++ dp/wifi3.0/dp_main.c | 2 ++ dp/wifi3.0/dp_types.h | 1 + 3 files changed, 10 insertions(+) diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index 69ea2401438c..4dcfd5165022 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -212,6 +212,12 @@ typedef QDF_STATUS(*ol_txrx_rsim_rx_decap_fp)(void *osif_dev, qdf_nbuf_t *list_head, qdf_nbuf_t *list_tail); +/* ol_txrx_rx_fp - external tx free function to read per packet stats and + * free tx buffer externally + * @netbuf - tx network buffer + */ +typedef void (*ol_txrx_tx_free_ext_fp)(qdf_nbuf_t netbuf); + /** * ol_txrx_rx_check_wai_fp - OSIF WAPI receive function */ @@ -291,6 +297,7 @@ struct ol_txrx_ops { /* tx function pointers - specified by txrx, stored by OS shim */ struct { ol_txrx_tx_fp tx; + ol_txrx_tx_free_ext_fp tx_free_ext; } tx; /* rx function pointers - specified by OS shim, stored by txrx */ diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 6e5119601f74..a73d33b4fce4 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -1318,6 +1318,7 @@ static struct cdp_vdev *dp_vdev_attach_wifi3(struct cdp_pdev *txrx_pdev, vdev->osif_rx = NULL; vdev->osif_rsim_rx_decap = NULL; vdev->osif_rx_mon = NULL; + vdev->osif_tx_free_ext = NULL; vdev->osif_vdev = NULL; vdev->delete.pending = 0; @@ -1376,6 +1377,7 @@ static void dp_vdev_register_wifi3(struct cdp_vdev *vdev_handle, vdev->osif_rx = txrx_ops->rx.rx; vdev->osif_rsim_rx_decap = txrx_ops->rx.rsim_rx_decap; vdev->osif_rx_mon = txrx_ops->rx.mon; + vdev->osif_tx_free_ext = txrx_ops->tx.tx_free_ext; #ifdef notyet #if ATH_SUPPORT_WAPI vdev->osif_check_wai = txrx_ops->rx.wai_check; diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 662bd4cb407c..e5074e31301f 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -594,6 +594,7 @@ struct dp_vdev { /* callback to hand rx frames to the OS shim */ ol_txrx_rx_fp osif_rx; ol_txrx_rsim_rx_decap_fp osif_rsim_rx_decap; + ol_txrx_tx_free_ext_fp osif_tx_free_ext; #ifdef notyet /* callback to check if the msdu is an WAI (WAPI) frame */