iwlwifi: tlc: Add logs in rs_fw_rate_init func to print TLC configuration
authorAbhishek Naik <abhishek.naik@intel.com>
Thu, 10 Feb 2022 16:22:27 +0000 (18:22 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 18 Feb 2022 08:40:55 +0000 (10:40 +0200)
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: Abhishek Naik <abhishek.naik@intel.com>
Fixes: ae4c1bb06b66 ("iwlwifi: rs: add support for TLC config command ver 4")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220210181930.1fd6adfb6f1e.Icc8f5fd517735fcc10db098999ff1272da291298@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/api/datapath.h
drivers/net/wireless/intel/iwlwifi/fw/api/rs.h
drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c

index 5539d40..99235ba 100644 (file)
@@ -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,
 
index 173a699..2198ca5 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
index 6ba591f..9830d26 100644 (file)
@@ -1,7 +1,7 @@
 // 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);