iwlwifi: rename GEO_TX_POWER_LIMIT to PER_CHAIN_LIMIT_OFFSET_CMD
authorLuca Coelho <luciano.coelho@intel.com>
Sun, 24 Oct 2021 15:20:32 +0000 (18:20 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 28 Oct 2021 09:04:11 +0000 (12:04 +0300)
When this code was implemented, there was no official FW API
description yet, so a placeholder name was used (GEO_TX_POWER_LIMIT).
But then the command became actually called
PER_CHAIN_LIMIT_OFFSET_CMD.  Rename the command (and change related
comments) to PER_CHAIN_LIMIT_OFFSET_CMD to avoid confusion.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211024181719.672fa727ef75.I6572df5d1e3441a0214993a59985da9a9431f3e5@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/acpi.c
drivers/net/wireless/intel/iwlwifi/fw/api/phy.h
drivers/net/wireless/intel/iwlwifi/fw/api/power.h
drivers/net/wireless/intel/iwlwifi/mvm/fw.c
drivers/net/wireless/intel/iwlwifi/mvm/ops.c

index 4602e74d176daf40b1f2606e400621b17fc90954..bf431fa4fe81fd562f91cf36635a03b703122882 100644 (file)
@@ -862,10 +862,10 @@ IWL_EXPORT_SYMBOL(iwl_sar_get_wgds_table);
 bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt)
 {
        /*
-        * The GEO_TX_POWER_LIMIT command is not supported on earlier
-        * firmware versions.  Unfortunately, we don't have a TLV API
-        * flag to rely on, so rely on the major version which is in
-        * the first byte of ucode_ver.  This was implemented
+        * The PER_CHAIN_LIMIT_OFFSET_CMD command is not supported on
+        * earlier firmware versions.  Unfortunately, we don't have a
+        * TLV API flag to rely on, so rely on the major version which
+        * is in the first byte of ucode_ver.  This was implemented
         * initially on version 38 and then backported to 17.  It was
         * also backported to 29, but only for 7265D devices.  The
         * intention was to have it in 36 as well, but not all 8000
index d07a632f1af7c4598a067b57a303ec0c520b9f91..c04f2521fcb3be55cd24e89aa0b696da24dfeeb3 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2012-2014, 2019-2020 Intel Corporation
+ * Copyright (C) 2012-2014, 2019-2021 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
  */
@@ -29,9 +29,9 @@ enum iwl_phy_ops_subcmd_ids {
        TEMP_REPORTING_THRESHOLDS_CMD = 0x04,
 
        /**
-        * @GEO_TX_POWER_LIMIT: &struct iwl_geo_tx_power_profiles_cmd
+        * @PER_CHAIN_LIMIT_OFFSET_CMD: &struct iwl_geo_tx_power_profiles_cmd
         */
-       GEO_TX_POWER_LIMIT = 0x05,
+       PER_CHAIN_LIMIT_OFFSET_CMD = 0x05,
 
        /**
         * @PER_PLATFORM_ANT_GAIN_CMD: &struct iwl_ppag_table_cmd
index 44dd64e78a2cc55345e260904595ec9481ab57ca..4d671c878bb7a097b6705fc61c1df5c817f8b4be 100644 (file)
@@ -391,10 +391,10 @@ struct iwl_dev_tx_power_cmd {
 enum iwl_geo_per_chain_offset_operation {
        IWL_PER_CHAIN_OFFSET_SET_TABLES,
        IWL_PER_CHAIN_OFFSET_GET_CURRENT_TABLE,
-};  /* GEO_TX_POWER_LIMIT FLAGS TYPE */
+};  /* PER_CHAIN_OFFSET_OPERATION_E */
 
 /**
- * struct iwl_per_chain_offset - embedded struct for GEO_TX_POWER_LIMIT.
+ * struct iwl_per_chain_offset - embedded struct for PER_CHAIN_LIMIT_OFFSET_CMD.
  * @max_tx_power: maximum allowed tx power.
  * @chain_a: tx power offset for chain a.
  * @chain_b: tx power offset for chain b.
@@ -406,17 +406,17 @@ struct iwl_per_chain_offset {
 } __packed; /* PER_CHAIN_LIMIT_OFFSET_PER_CHAIN_S_VER_1 */
 
 /**
- * struct iwl_geo_tx_power_profile_cmd_v1 - struct for GEO_TX_POWER_LIMIT cmd.
+ * struct iwl_geo_tx_power_profile_cmd_v1 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd.
  * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
  * @table: offset profile per band.
  */
 struct iwl_geo_tx_power_profiles_cmd_v1 {
        __le32 ops;
        struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES][IWL_NUM_BANDS_PER_CHAIN_V1];
-} __packed; /* GEO_TX_POWER_LIMIT_VER_1 */
+} __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_1 */
 
 /**
- * struct iwl_geo_tx_power_profile_cmd_v2 - struct for GEO_TX_POWER_LIMIT cmd.
+ * struct iwl_geo_tx_power_profile_cmd_v2 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd.
  * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
  * @table: offset profile per band.
  * @table_revision: BIOS table revision.
@@ -425,10 +425,10 @@ struct iwl_geo_tx_power_profiles_cmd_v2 {
        __le32 ops;
        struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES][IWL_NUM_BANDS_PER_CHAIN_V1];
        __le32 table_revision;
-} __packed; /* GEO_TX_POWER_LIMIT_VER_2 */
+} __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_2 */
 
 /**
- * struct iwl_geo_tx_power_profile_cmd_v3 - struct for GEO_TX_POWER_LIMIT cmd.
+ * struct iwl_geo_tx_power_profile_cmd_v3 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd.
  * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
  * @table: offset profile per band.
  * @table_revision: BIOS table revision.
@@ -437,10 +437,10 @@ struct iwl_geo_tx_power_profiles_cmd_v3 {
        __le32 ops;
        struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES][IWL_NUM_BANDS_PER_CHAIN_V2];
        __le32 table_revision;
-} __packed; /* GEO_TX_POWER_LIMIT_VER_3 */
+} __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_3 */
 
 /**
- * struct iwl_geo_tx_power_profile_cmd_v4 - struct for GEO_TX_POWER_LIMIT cmd.
+ * struct iwl_geo_tx_power_profile_cmd_v4 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd.
  * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
  * @table: offset profile per band.
  * @table_revision: BIOS table revision.
@@ -449,10 +449,10 @@ struct iwl_geo_tx_power_profiles_cmd_v4 {
        __le32 ops;
        struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES_V3][IWL_NUM_BANDS_PER_CHAIN_V1];
        __le32 table_revision;
-} __packed; /* GEO_TX_POWER_LIMIT_VER_4 */
+} __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_4 */
 
 /**
- * struct iwl_geo_tx_power_profile_cmd_v5 - struct for GEO_TX_POWER_LIMIT cmd.
+ * struct iwl_geo_tx_power_profile_cmd_v5 - struct for PER_CHAIN_LIMIT_OFFSET_CMD cmd.
  * @ops: operations, value from &enum iwl_geo_per_chain_offset_operation
  * @table: offset profile per band.
  * @table_revision: BIOS table revision.
@@ -461,7 +461,7 @@ struct iwl_geo_tx_power_profiles_cmd_v5 {
        __le32 ops;
        struct iwl_per_chain_offset table[IWL_NUM_GEO_PROFILES_V3][IWL_NUM_BANDS_PER_CHAIN_V2];
        __le32 table_revision;
-} __packed; /* GEO_TX_POWER_LIMIT_VER_5 */
+} __packed; /* PER_CHAIN_LIMIT_OFFSET_CMD_VER_5 */
 
 union iwl_geo_tx_power_profiles_cmd {
        struct iwl_geo_tx_power_profiles_cmd_v1 v1;
@@ -472,12 +472,12 @@ union iwl_geo_tx_power_profiles_cmd {
 };
 
 /**
- * struct iwl_geo_tx_power_profiles_resp -  response to GEO_TX_POWER_LIMIT cmd
+ * struct iwl_geo_tx_power_profiles_resp -  response to PER_CHAIN_LIMIT_OFFSET_CMD cmd
  * @profile_idx: current geo profile in use
  */
 struct iwl_geo_tx_power_profiles_resp {
        __le32 profile_idx;
-} __packed; /* GEO_TX_POWER_LIMIT_RESP */
+} __packed; /* PER_CHAIN_LIMIT_OFFSET_RSP */
 
 /**
  * union iwl_ppag_table_cmd - union for all versions of PPAG command
index 8b96b885658f1da404319dfb72fbfc1cb37632ed..863fec150e5368ca2246469df628c5fc9fabf9f8 100644 (file)
@@ -769,7 +769,7 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)
        int ret;
        struct iwl_host_cmd cmd;
        u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, PHY_OPS_GROUP,
-                                          GEO_TX_POWER_LIMIT,
+                                          PER_CHAIN_LIMIT_OFFSET_CMD,
                                           IWL_FW_CMD_VER_UNKNOWN);
 
        /* the ops field is at the same spot for all versions, so set in v1 */
@@ -792,7 +792,7 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)
                return -EOPNOTSUPP;
 
        cmd = (struct iwl_host_cmd){
-               .id =  WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT),
+               .id =  WIDE_ID(PHY_OPS_GROUP, PER_CHAIN_LIMIT_OFFSET_CMD),
                .len = { len, },
                .flags = CMD_WANT_SKB,
                .data = { &geo_tx_cmd },
@@ -822,7 +822,7 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
        u32 n_profiles;
        int ret;
        u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, PHY_OPS_GROUP,
-                                          GEO_TX_POWER_LIMIT,
+                                          PER_CHAIN_LIMIT_OFFSET_CMD,
                                           IWL_FW_CMD_VER_UNKNOWN);
 
        BUILD_BUG_ON(offsetof(struct iwl_geo_tx_power_profiles_cmd_v1, ops) !=
@@ -894,7 +894,8 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
                cmd.v2.table_revision = cpu_to_le32(mvm->fwrt.geo_rev);
 
        return iwl_mvm_send_cmd_pdu(mvm,
-                                   WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT),
+                                   WIDE_ID(PHY_OPS_GROUP,
+                                           PER_CHAIN_LIMIT_OFFSET_CMD),
                                    0, len, &cmd);
 }
 
index e331e18b9ab188d112f1f2f5cec186574925dc8f..0ad45d11c9e063d969b58d8d59fb5164b7736203 100644 (file)
@@ -521,7 +521,7 @@ static const struct iwl_hcmd_names iwl_mvm_phy_names[] = {
        HCMD_NAME(CMD_DTS_MEASUREMENT_TRIGGER_WIDE),
        HCMD_NAME(CTDP_CONFIG_CMD),
        HCMD_NAME(TEMP_REPORTING_THRESHOLDS_CMD),
-       HCMD_NAME(GEO_TX_POWER_LIMIT),
+       HCMD_NAME(PER_CHAIN_LIMIT_OFFSET_CMD),
        HCMD_NAME(CT_KILL_NOTIFICATION),
        HCMD_NAME(DTS_MEASUREMENT_NOTIF_WIDE),
 };