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

Commit b175ba6d authored by Yu Tian's avatar Yu Tian Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Add an ini control to disable Dynamic GRO feature

Dynamic GRO feature is enabled by default and aimed for specific
customers. Add an ini control to allow other customers to config
this feature enable/disable.

Change-Id: I83edd69d0e30d5944f0724ed8350328abff619bb
CRs-Fixed: 3070912
parent 292ac687
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -436,6 +437,7 @@ static void cds_cdp_cfg_attach(struct wlan_objmgr_psoc *psoc)
	struct txrx_pdev_cfg_param_t cdp_cfg = {0};
	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
	struct hdd_context *hdd_ctx = gp_cds_context->hdd_context;
	uint32_t gro_bit_set;

	cdp_cfg.is_full_reorder_offload =
		cfg_get(psoc, CFG_DP_REORDER_OFFLOAD_SUPPORT);
@@ -463,7 +465,9 @@ static void cds_cdp_cfg_attach(struct wlan_objmgr_psoc *psoc)
	cdp_cfg.sg_enable = cfg_get(psoc, CFG_DP_SG);
	cdp_cfg.enable_data_stall_detection =
		cfg_get(psoc, CFG_DP_ENABLE_DATA_STALL_DETECTION);
	cdp_cfg.gro_enable = cfg_get(psoc, CFG_DP_GRO);
	gro_bit_set = cfg_get(psoc, CFG_DP_GRO);
	if (gro_bit_set & DP_GRO_ENABLE_BIT_SET)
		cdp_cfg.gro_enable = true;
	cdp_cfg.enable_flow_steering =
		cfg_get(psoc, CFG_DP_FLOW_STEERING_ENABLED);
	cdp_cfg.disable_intra_bss_fwd =
@@ -906,6 +910,13 @@ QDF_STATUS cds_dp_open(struct wlan_objmgr_psoc *psoc)
{
	QDF_STATUS qdf_status;
	struct dp_txrx_config dp_config;
	struct hdd_context *hdd_ctx;

	hdd_ctx = gp_cds_context->hdd_context;
	if (!hdd_ctx) {
		cds_err("HDD context is null");
		return QDF_STATUS_E_FAILURE;
	}

	qdf_status = cdp_pdev_attach(cds_get_context(QDF_MODULE_ID_SOC),
				     gp_cds_context->htc_ctx,
@@ -939,6 +950,11 @@ QDF_STATUS cds_dp_open(struct wlan_objmgr_psoc *psoc)

	cds_debug("CDS successfully Opened");

	if (cdp_cfg_get(gp_cds_context->dp_soc, cfg_dp_force_gro_enable))
		hdd_ctx->dp_agg_param.force_gro_enable = true;
	else
		hdd_ctx->dp_agg_param.force_gro_enable = false;

	return 0;

intr_close:
+2 −0
Original line number Diff line number Diff line
@@ -1782,6 +1782,7 @@ struct hdd_adapter_ops_history {
 * @sar_cmd_params: SAR command params to be configured to the FW
 * @rx_aggregation: rx aggregation enable or disable state
 * @gro_force_flush: gro force flushed indication flag
 * @force_gro_enable: force GRO enable or disable flag
 * @adapter_ops_wq: High priority workqueue for handling adapter operations
 * @is_dual_mac_cfg_updated: indicate whether dual mac cfg has been updated
 * @rx_skip_qdisc_chk_conc: flag to skip ingress qdisc check in concurrency
@@ -2112,6 +2113,7 @@ struct hdd_context {
	struct {
		qdf_atomic_t rx_aggregation;
		uint8_t gro_force_flush[DP_MAX_RX_THREADS];
		bool force_gro_enable;
	} dp_agg_param;
#ifdef FW_THERMAL_THROTTLE_SUPPORT
	uint8_t dutycycle_off_percent;
+3 −1
Original line number Diff line number Diff line
@@ -2240,6 +2240,8 @@ QDF_STATUS hdd_rx_deliver_to_stack(struct hdd_adapter *adapter,
	bool skb_receive_offload_ok = false;
	uint8_t rx_ctx_id = QDF_NBUF_CB_RX_CTX_ID(skb);

	if (!hdd_ctx->dp_agg_param.force_gro_enable)
		/* rx_ctx_id is already verified for out-of-range */
		hdd_rx_check_qdisc_for_adapter(adapter, rx_ctx_id);

	if (QDF_NBUF_CB_RX_TCP_PROTO(skb) &&