From e2fa8b7861d7cc5ef9a346d435ecd7f8804388a3 Mon Sep 17 00:00:00 2001 From: Manikandan Mohan Date: Wed, 22 Mar 2017 11:18:26 -0700 Subject: [PATCH] qcacmn: Setup CDP interface for flushing RX queue Refactor flush rx queue function call based on soc by adding an interface to CDP funtion indirection table. Change-Id: Iea201553f555a6c317cf37e586433aa493e51623 CRs-fixed: 2023399 --- dp/inc/cdp_txrx_cmn.h | 11 +++++++++++ dp/inc/cdp_txrx_ops.h | 1 + dp/wifi3.0/dp_main.c | 1 + 3 files changed, 13 insertions(+) diff --git a/dp/inc/cdp_txrx_cmn.h b/dp/inc/cdp_txrx_cmn.h index ed3ad8e08a80..3bf51695d3d3 100644 --- a/dp/inc/cdp_txrx_cmn.h +++ b/dp/inc/cdp_txrx_cmn.h @@ -445,6 +445,17 @@ static inline void cdp_set_pdev_dscp_tid_map(ol_txrx_soc_handle soc, return; } +/** + * cdp_flush_cache_rx_queue() - flush cache rx queue frame + * + * Return: None + */ +static inline void cdp_flush_cache_rx_queue(ol_txrx_soc_handle soc) +{ + if (soc->ops->cmn_drv_ops->flush_cache_rx_queue) + soc->ops->cmn_drv_ops->flush_cache_rx_queue(); +} + /** * cdp_txrx_stats(): function to map to host and firmware statistics * @soc: soc handle diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 0331e9736557..7d09546f956b 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -192,6 +192,7 @@ struct cdp_cmn_ops { void (*set_vdev_dscp_tid_map)(struct cdp_vdev *vdev_handle, uint8_t map_id); + void (*flush_cache_rx_queue)(void); void (*set_pdev_dscp_tid_map)(struct cdp_pdev *pdev, uint8_t map_id, uint8_t tos, uint8_t tid); diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 16b665935520..687294dc6bce 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -2897,6 +2897,7 @@ static struct cdp_cmn_ops dp_ops_cmn = { .addba_responsesetup = dp_addba_responsesetup_wifi3, .delba_process = dp_delba_process_wifi3, .get_peer_mac_addr_frm_id = dp_get_peer_mac_addr_frm_id, + .flush_cache_rx_queue = NULL, /* TODO: get API's for dscp-tid need to be added*/ .set_vdev_dscp_tid_map = dp_set_vdev_dscp_tid_map_wifi3, .set_pdev_dscp_tid_map = dp_set_pdev_dscp_tid_map_wifi3,