From aa6ca443db9dca9456c2d69d93696edaf565cc81 Mon Sep 17 00:00:00 2001 From: Nirav Shah Date: Wed, 13 Nov 2019 18:17:05 +0530 Subject: [PATCH] qcacmn: Add logic to bundle packets for HL Add logic to queue and bundle packets before giving it to scheduler to ensure predictive HTC bundling for improvement in TX throughput. Change-Id: Iab5066a46235ce7e41fd29c44a2ce0cfb04b1505 CRs-Fixed: 2574530 --- dp/inc/cdp_txrx_misc.h | 32 ++++++++++++++++++++++++++++++++ dp/inc/cdp_txrx_mob_def.h | 5 +++++ dp/inc/cdp_txrx_ops.h | 7 +++++++ 3 files changed, 44 insertions(+) diff --git a/dp/inc/cdp_txrx_misc.h b/dp/inc/cdp_txrx_misc.h index 9c6869f224fb..c36a1edec8ac 100644 --- a/dp/inc/cdp_txrx_misc.h +++ b/dp/inc/cdp_txrx_misc.h @@ -714,4 +714,36 @@ static inline void cdp_vdev_set_driver_del_ack_enable(ol_txrx_soc_handle soc, return soc->ops->misc_ops->vdev_set_driver_del_ack_enable( soc, vdev_id, rx_packets, time_in_ms, high_th, low_th); } + +static inline void cdp_vdev_set_bundle_require_flag(ol_txrx_soc_handle soc, + uint8_t vdev_id, + unsigned long tx_bytes, + uint32_t time_in_ms, + uint32_t high_th, + uint32_t low_th) +{ + if (!soc || !soc->ops || !soc->ops->misc_ops) { + QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL, + "%s invalid instance", __func__); + return; + } + + if (soc->ops->misc_ops->vdev_set_bundle_require_flag) + return soc->ops->misc_ops->vdev_set_bundle_require_flag( + vdev_id, tx_bytes, time_in_ms, high_th, low_th); +} + +static inline void cdp_pdev_reset_bundle_require_flag(ol_txrx_soc_handle soc, + uint8_t pdev_id) +{ + if (!soc || !soc->ops || !soc->ops->misc_ops) { + QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL, + "%s invalid instance", __func__); + return; + } + + if (soc->ops->misc_ops->pdev_reset_bundle_require_flag) + return soc->ops->misc_ops->pdev_reset_bundle_require_flag( + soc, pdev_id); +} #endif /* _CDP_TXRX_MISC_H_ */ diff --git a/dp/inc/cdp_txrx_mob_def.h b/dp/inc/cdp_txrx_mob_def.h index 4bf55fbd6bc1..0e17116792ba 100644 --- a/dp/inc/cdp_txrx_mob_def.h +++ b/dp/inc/cdp_txrx_mob_def.h @@ -313,6 +313,11 @@ struct txrx_pdev_cfg_param_t { bool enable_data_stall_detection; bool enable_flow_steering; bool disable_intra_bss_fwd; + +#ifdef WLAN_SUPPORT_TXRX_HL_BUNDLE + uint16_t bundle_timer_value; + uint16_t bundle_size; +#endif }; #ifdef IPA_OFFLOAD diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index e7a51f8a6d94..6439fe2905c4 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -1114,6 +1114,13 @@ struct cdp_misc_ops { uint32_t time_in_ms, uint32_t high_th, uint32_t low_th); + void (*vdev_set_bundle_require_flag)(uint8_t vdev_id, + unsigned long tx_bytes, + uint32_t time_in_ms, + uint32_t high_th, + uint32_t low_th); + void (*pdev_reset_bundle_require_flag)(struct cdp_soc_t *soc_hdl, + uint8_t pdev_id); }; /**