aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorJay Sternberg <jay.e.sternberg@intel.com>2010-07-02 18:49:10 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-07-09 13:16:54 -0400
commit4b58645ce68c5fd446bff0c847ff9385cd204680 (patch)
treedb8dc828cca7e1889d6f453234a5769585ebebd7 /drivers/net/wireless/iwlwifi/iwl-agn.c
parent0326433995ad43b64ebabdd2390a5d11f33f025b (diff)
iwlwifi: correct descriptions of advanced ucode errors
ucode errors were redefined in new ucode images and all new errors were showing as advanced sysasserts which was misleading. new errors are not sequential so additional lookup table added. errors do not overlap so both are used to support older and newer ucode images. Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c36
1 files changed, 30 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index b5d19398de00..7391c63fb024 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2296,17 +2296,41 @@ static const char *desc_lookup_text[] = {
2296 "DEBUG_1", 2296 "DEBUG_1",
2297 "DEBUG_2", 2297 "DEBUG_2",
2298 "DEBUG_3", 2298 "DEBUG_3",
2299 "ADVANCED SYSASSERT"
2300}; 2299};
2301 2300
2302static const char *desc_lookup(int i) 2301static struct { char *name; u8 num; } advanced_lookup[] = {
2302 { "NMI_INTERRUPT_WDG", 0x34 },
2303 { "SYSASSERT", 0x35 },
2304 { "UCODE_VERSION_MISMATCH", 0x37 },
2305 { "BAD_COMMAND", 0x38 },
2306 { "NMI_INTERRUPT_DATA_ACTION_PT", 0x3C },
2307 { "FATAL_ERROR", 0x3D },
2308 { "NMI_TRM_HW_ERR", 0x46 },
2309 { "NMI_INTERRUPT_TRM", 0x4C },
2310 { "NMI_INTERRUPT_BREAK_POINT", 0x54 },
2311 { "NMI_INTERRUPT_WDG_RXF_FULL", 0x5C },
2312 { "NMI_INTERRUPT_WDG_NO_RBD_RXF_FULL", 0x64 },
2313 { "NMI_INTERRUPT_HOST", 0x66 },
2314 { "NMI_INTERRUPT_ACTION_PT", 0x7C },
2315 { "NMI_INTERRUPT_UNKNOWN", 0x84 },
2316 { "NMI_INTERRUPT_INST_ACTION_PT", 0x86 },
2317 { "ADVANCED_SYSASSERT", 0 },
2318};
2319
2320static const char *desc_lookup(u32 num)
2303{ 2321{
2304 int max = ARRAY_SIZE(desc_lookup_text) - 1; 2322 int i;
2323 int max = ARRAY_SIZE(desc_lookup_text);
2305 2324
2306 if (i < 0 || i > max) 2325 if (num < max)
2307 i = max; 2326 return desc_lookup_text[num];
2308 2327
2309 return desc_lookup_text[i]; 2328 max = ARRAY_SIZE(advanced_lookup) - 1;
2329 for (i = 0; i < max; i++) {
2330 if (advanced_lookup[i].num == num)
2331 break;;
2332 }
2333 return advanced_lookup[i].name;
2310} 2334}
2311 2335
2312#define ERROR_START_OFFSET (1 * sizeof(u32)) 2336#define ERROR_START_OFFSET (1 * sizeof(u32))