OSDN Git Service

iwlwifi: dbg_ini: add lmac and umac error tables dumping support
authorShahar S Matityahu <shahar.s.matityahu@intel.com>
Sun, 7 Apr 2019 07:41:20 +0000 (10:41 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 29 Apr 2019 15:42:47 +0000 (18:42 +0300)
Add LMAC_ERROR_TABLE and UMAC_ERROR_TABLE region types and handle them
in the same way as we handle DEVICE_MEMORY.

Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h
drivers/net/wireless/intel/iwlwifi/fw/dbg.c

index af1e3d0..f4202bc 100644 (file)
@@ -473,6 +473,8 @@ enum iwl_fw_ini_debug_flow {
  * @IWL_FW_INI_REGION_CSR: CSR registers
  * @IWL_FW_INI_REGION_NOTIFICATION: FW notification data
  * @IWL_FW_INI_REGION_DHC: dhc response to dump
+ * @IWL_FW_INI_REGION_LMAC_ERROR_TABLE: lmac error table
+ * @IWL_FW_INI_REGION_UMAC_ERROR_TABLE: umac error table
  * @IWL_FW_INI_REGION_NUM: number of region types
  */
 enum iwl_fw_ini_region_type {
@@ -490,6 +492,8 @@ enum iwl_fw_ini_region_type {
        IWL_FW_INI_REGION_CSR,
        IWL_FW_INI_REGION_NOTIFICATION,
        IWL_FW_INI_REGION_DHC,
+       IWL_FW_INI_REGION_LMAC_ERROR_TABLE,
+       IWL_FW_INI_REGION_UMAC_ERROR_TABLE,
        IWL_FW_INI_REGION_NUM
 }; /* FW_DEBUG_TLV_REGION_TYPE_E_VER_1 */
 
index 79e3633..035eeea 100644 (file)
@@ -1760,6 +1760,8 @@ static int iwl_fw_ini_get_trigger_len(struct iwl_fw_runtime *fwrt,
                case IWL_FW_INI_REGION_PERIPHERY_PHY:
                case IWL_FW_INI_REGION_PERIPHERY_AUX:
                case IWL_FW_INI_REGION_CSR:
+               case IWL_FW_INI_REGION_LMAC_ERROR_TABLE:
+               case IWL_FW_INI_REGION_UMAC_ERROR_TABLE:
                        size += hdr_len + iwl_dump_ini_mem_get_size(fwrt, reg);
                        break;
                case IWL_FW_INI_REGION_TXF:
@@ -1821,6 +1823,8 @@ static void iwl_fw_ini_dump_trigger(struct iwl_fw_runtime *fwrt,
 
                switch (le32_to_cpu(reg->region_type)) {
                case IWL_FW_INI_REGION_DEVICE_MEMORY:
+               case IWL_FW_INI_REGION_LMAC_ERROR_TABLE:
+               case IWL_FW_INI_REGION_UMAC_ERROR_TABLE:
                        ops.get_num_of_ranges = iwl_dump_ini_mem_ranges;
                        ops.get_size = iwl_dump_ini_mem_get_size;
                        ops.fill_mem_hdr = iwl_dump_ini_mem_fill_header;
@@ -2498,7 +2502,9 @@ static void iwl_fw_dbg_update_regions(struct iwl_fw_runtime *fwrt,
                         type == IWL_FW_INI_REGION_PERIPHERY_AUX ||
                         type == IWL_FW_INI_REGION_INTERNAL_BUFFER ||
                         type == IWL_FW_INI_REGION_PAGING ||
-                        type == IWL_FW_INI_REGION_CSR)
+                        type == IWL_FW_INI_REGION_CSR ||
+                        type == IWL_FW_INI_REGION_LMAC_ERROR_TABLE ||
+                        type == IWL_FW_INI_REGION_UMAC_ERROR_TABLE)
                        iter += le32_to_cpu(reg->internal.num_of_ranges) *
                                sizeof(__le32);