Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 899e3060 authored by Yu Tian's avatar Yu Tian Committed by snandini
Browse files

qcacld-3.0: add gro flush when bus change to idle

GRO queue more pkts is enabled in bus vote low, when
bus vote back to idle, these frames may not flushed to
stack, use force flush to reduce latency.

Change-Id: Ia682ec80a196fb913455c63bd165b0a5184b94b7
CRs-Fixed: 2786842
parent 10c10662
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@
#include "enet.h"
#include <cdp_txrx_cmn_struct.h>
#include <dp_txrx.h>
#include <dp_rx_thread.h>
#include "wlan_hdd_sysfs.h"
#include "wlan_disa_ucfg_api.h"
#include "wlan_disa_obj_mgmt_api.h"
@@ -9080,6 +9081,8 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
	cpumask_t pm_qos_cpu_mask;
	bool is_rx_pm_qos_high = false;
	bool is_tx_pm_qos_high = false;
	ol_txrx_soc_handle soc = cds_get_context(QDF_MODULE_ID_SOC);
	int i;

	cpumask_clear(&pm_qos_cpu_mask);

@@ -9101,6 +9104,14 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
		if (++hdd_ctx->bus_low_vote_cnt >= bus_low_cnt_threshold)
			qdf_atomic_set(&hdd_ctx->low_tput_gro_enable, 1);
	} else {
		if (qdf_atomic_read(&hdd_ctx->low_tput_gro_enable) &&
			    hdd_ctx->enable_dp_rx_threads) {
			/* flush pending rx pkts when LOW->IDLE */
			hdd_debug("flush queued GRO pkts");
			for (i = 0; i < cdp_get_num_rx_contexts(soc); i++) {
				dp_rx_gro_flush_ind(soc, i);
			}
		}
		hdd_ctx->bus_low_vote_cnt = 0;
		qdf_atomic_set(&hdd_ctx->low_tput_gro_enable, 0);
	}