qcacld-3.0: Check consistency in throughput before setting delack

Integration from cld-2.0 to cld-3.0.

Currently the throughput is measured every 100 ms. Delack is set to 20
if throughput for this interval is greater then threshold (~57 Mbps).
In the case of congestion control, tcp may take longer duration for
rampup. In this change, throughput is checked for consistency for
about three seconds and then tcp delack is set to 20.

CRs-Fixed: 1028085
Change-Id: I1a4e9be3407ac426a314e1192d0e1d315e1899e0
diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c
index 479ed89..317f993 100644
--- a/core/hdd/src/wlan_hdd_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_tx_rx.c
@@ -60,6 +60,7 @@
 #include "ol_txrx.h"
 
 #include "wlan_hdd_nan_datapath.h"
+#include "pld_common.h"
 
 const uint8_t hdd_wmm_ac_to_highest_up[] = {
 	SME_QOS_WMM_UP_RESV,
@@ -1396,4 +1397,21 @@
 	hdd_ctxt->enableRxThread = true;
 }
 
+#ifdef MSM_PLATFORM
+/**
+ * hdd_reset_tcp_delack() - Reset tcp delack value to default
+ * @hdd_ctx: Handle to hdd context
+ *
+ * Function used to reset TCP delack value to its default value
+ *
+ * Return: None
+ */
+void hdd_reset_tcp_delack(hdd_context_t *hdd_ctx)
+{
+	enum pld_bus_width_type next_level = PLD_BUS_WIDTH_LOW;
 
+	hdd_ctx->rx_high_ind_cnt = 0;
+	wlan_hdd_send_svc_nlink_msg(hdd_ctx->radio_index, WLAN_SVC_WLAN_TP_IND,
+				    &next_level, sizeof(next_level));
+}
+#endif /* MSM_PLATFORM */