Commit e4b89fce authored by Abhishek Naik's avatar Abhishek Naik Committed by Luca Coelho
Browse files

iwlwifi: tlc: Add logs in rs_fw_rate_init func to print TLC configuration



Add logs in rs_fw_rate_init function. It helps in
verifying TLC Configuration while debuging TLC related bugs.

Update kernel doc for TLC_MNG_CONFIG_CMD with correct version
of struct iwl_tlc_config_cmd.

Signed-off-by: default avatarAbhishek Naik <abhishek.naik@intel.com>
Fixes: ae4c1bb0 ("iwlwifi: rs: add support for TLC config command ver 4")
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220210181930.1fd6adfb6f1e.Icc8f5fd517735fcc10db098999ff1272da291298@changeid


Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 64ff7eb0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ enum iwl_data_path_subcmd_ids {
	RFH_QUEUE_CONFIG_CMD = 0xD,

	/**
	 * @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd
	 * @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd_v4
	 */
	TLC_MNG_CONFIG_CMD = 0xF,

+3 −3
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
 * Copyright (C) 2012-2014, 2018-2020 Intel Corporation
 * Copyright (C) 2012-2014, 2018-2022 Intel Corporation
 * Copyright (C) 2017 Intel Deutschland GmbH
 */
#ifndef __iwl_fw_api_rs_h__
@@ -133,7 +133,7 @@ enum IWL_TLC_MCS_PER_BW {
};

/**
 * struct tlc_config_cmd - TLC configuration
 * struct iwl_tlc_config_cmd_v3 - TLC configuration
 * @sta_id: station id
 * @reserved1: reserved
 * @max_ch_width: max supported channel width from @enum iwl_tlc_mng_cfg_cw
@@ -168,7 +168,7 @@ struct iwl_tlc_config_cmd_v3 {
} __packed; /* TLC_MNG_CONFIG_CMD_API_S_VER_3 */

/**
 * struct tlc_config_cmd - TLC configuration
 * struct iwl_tlc_config_cmd_v4 - TLC configuration
 * @sta_id: station id
 * @reserved1: reserved
 * @max_ch_width: max supported channel width from &enum iwl_tlc_mng_cfg_cw
+13 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
 * Copyright (C) 2017 Intel Deutschland GmbH
 * Copyright (C) 2018-2021 Intel Corporation
 * Copyright (C) 2018-2022 Intel Corporation
 */
#include "rs.h"
#include "fw-api.h"
@@ -456,6 +456,18 @@ void rs_fw_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
					WIDE_ID(DATA_PATH_GROUP,
						TLC_MNG_CONFIG_CMD),
					0);
	IWL_DEBUG_RATE(mvm, "TLC CONFIG CMD, sta_id=%d, max_ch_width=%d, mode=%d\n",
		       cfg_cmd.sta_id, cfg_cmd.max_ch_width, cfg_cmd.mode);
	IWL_DEBUG_RATE(mvm, "TLC CONFIG CMD, chains=0x%X, ch_wid_supp=%d, flags=0x%X\n",
		       cfg_cmd.chains, cfg_cmd.sgi_ch_width_supp, cfg_cmd.flags);
	IWL_DEBUG_RATE(mvm, "TLC CONFIG CMD, mpdu_len=%d, no_ht_rate=0x%X, tx_op=%d\n",
		       cfg_cmd.max_mpdu_len, cfg_cmd.non_ht_rates, cfg_cmd.max_tx_op);
	IWL_DEBUG_RATE(mvm, "TLC CONFIG CMD, ht_rate[0][0]=0x%X, ht_rate[1][0]=0x%X\n",
		       cfg_cmd.ht_rates[0][0], cfg_cmd.ht_rates[1][0]);
	IWL_DEBUG_RATE(mvm, "TLC CONFIG CMD, ht_rate[0][1]=0x%X, ht_rate[1][1]=0x%X\n",
		       cfg_cmd.ht_rates[0][1], cfg_cmd.ht_rates[1][1]);
	IWL_DEBUG_RATE(mvm, "TLC CONFIG CMD, ht_rate[0][2]=0x%X, ht_rate[1][2]=0x%X\n",
		       cfg_cmd.ht_rates[0][2], cfg_cmd.ht_rates[1][2]);
	if (cmd_ver == 4) {
		ret = iwl_mvm_send_cmd_pdu(mvm, cmd_id, CMD_ASYNC,
					   sizeof(cfg_cmd), &cfg_cmd);