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

Commit 681403ca authored by Kiran Kumar Lokere's avatar Kiran Kumar Lokere Committed by nshrivas
Browse files

qcacld-3.0: Support for auto rate LDPC configuration

Add support to configure auto rate LDPC setting to FW.

Change-Id: Ic2b707c7e2132f83b4ab8732b8e087742888725e
CRs-Fixed: 2613203
parent cda4436f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3460,6 +3460,8 @@ int hdd_set_ldpc(struct hdd_adapter *adapter, int value)
	ret = sme_update_he_ldpc_supp(mac_handle, adapter->vdev_id, value);
	if (ret)
		hdd_err("Failed to set HE LDPC value");
	ret = sme_set_auto_rate_ldpc(mac_handle, adapter->vdev_id,
				     (value ? 0 : 1));

	return ret;
}
+2 −0
Original line number Diff line number Diff line
@@ -5310,6 +5310,8 @@ struct wow_enable_params {
#define AUTO_RATE_GI_1600NS	10
#define AUTO_RATE_GI_3200NS	11

#define AUTO_RATE_LDPC_DIS_BIT	16

#define SET_AUTO_RATE_SGI_VAL(set_val, bit_mask) \
	(set_val = (set_val & HE_LTF_ALL) | bit_mask)

+11 −0
Original line number Diff line number Diff line
@@ -3013,6 +3013,17 @@ int sme_set_no_ack_policy(mac_handle_t mac_handle, uint8_t session_id,
int sme_set_auto_rate_he_sgi(mac_handle_t mac_handle, uint8_t session_id,
			     uint8_t cfg_val);

/**
 * sme_set_auto_rate_ldpc() - Sets LDPC for auto rate
 * @mac_handle: Opaque handle to the global MAC context
 * @session_id: SME session id
 * @ldpc_disable: LDPC configuration value
 *
 * Return: 0 on success else err code
 */
int sme_set_auto_rate_ldpc(mac_handle_t mac_handle, uint8_t session_id,
			   uint8_t ldpc_disable);

/**
 * sme_set_auto_rate_he_ltf() - Sets HE LTF for auto rate
 * @mac_handle: Opaque handle to the global MAC context
+24 −0
Original line number Diff line number Diff line
@@ -8550,6 +8550,30 @@ int sme_set_auto_rate_he_sgi(mac_handle_t mac_handle, uint8_t session_id,
	return 0;
}

int sme_set_auto_rate_ldpc(mac_handle_t mac_handle, uint8_t session_id,
			   uint8_t ldpc_disable)
{
	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
	uint32_t set_val;
	int status;

	set_val = mac_ctx->he_sgi_ltf_cfg_bit_mask;

	set_val |= (ldpc_disable << AUTO_RATE_LDPC_DIS_BIT);

	status = wma_cli_set_command(session_id,
				     WMI_VDEV_PARAM_AUTORATE_MISC_CFG,
				     set_val, VDEV_CMD);
	if (status) {
		sme_err("failed to set auto rate LDPC cfg");
		return status;
	}

	sme_debug("auto rate misc cfg set to 0x%08X", set_val);

	return 0;
}

#define HT20_SHORT_GI_MCS7_RATE 722
/*
 * sme_send_rate_update_ind() -