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
diff --git a/dp/inc/cdp_txrx_misc.h b/dp/inc/cdp_txrx_misc.h
index 9c6869f..c36a1ed 100644
--- a/dp/inc/cdp_txrx_misc.h
+++ b/dp/inc/cdp_txrx_misc.h
@@ -714,4 +714,36 @@
 		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 4bf55fb..0e17116 100644
--- a/dp/inc/cdp_txrx_mob_def.h
+++ b/dp/inc/cdp_txrx_mob_def.h
@@ -313,6 +313,11 @@
 	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 e7a51f8..6439fe2 100644
--- a/dp/inc/cdp_txrx_ops.h
+++ b/dp/inc/cdp_txrx_ops.h
@@ -1114,6 +1114,13 @@
 					       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);
 };
 
 /**