diff options
author | Matti Gottlieb <matti.gottlieb@intel.com> | 2013-07-04 15:47:30 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-07-16 14:15:03 +0400 |
commit | 0c393d4eac31912ad6ea362d4f9bf78aa1fe9a69 (patch) | |
tree | 420c70be14c87d5c47d7e35f66b968fb491d7536 /drivers/net/wireless/iwlwifi/mvm/utils.c | |
parent | 961de6a5ee568881321cf97e826cc37e6f9bcf84 (diff) | |
download | linux-0c393d4eac31912ad6ea362d4f9bf78aa1fe9a69.tar.xz |
iwlwifi: mvm: sram hex dump on NIC error
Add sram dump on NIC error for debug improvement.
Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/utils.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/utils.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/utils.c b/drivers/net/wireless/iwlwifi/mvm/utils.c index 1e1332839e4a..a9c357491434 100644 --- a/drivers/net/wireless/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/iwlwifi/mvm/utils.c @@ -453,6 +453,29 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm) IWL_ERR(mvm, "0x%08X | flow_handler\n", table.flow_handler); } +void iwl_mvm_dump_sram(struct iwl_mvm *mvm) +{ + const struct fw_img *img; + int ofs, len = 0; + u8 *buf; + + if (!mvm->ucode_loaded) + return; + + img = &mvm->fw->img[mvm->cur_ucode]; + ofs = img->sec[IWL_UCODE_SECTION_DATA].offset; + len = img->sec[IWL_UCODE_SECTION_DATA].len; + + buf = kzalloc(len, GFP_KERNEL); + if (!buf) + return; + + iwl_trans_read_mem_bytes(mvm->trans, ofs, buf, len); + iwl_print_hex_error(mvm->trans, buf, len); + + kfree(buf); +} + /** * iwl_mvm_send_lq_cmd() - Send link quality command * @init: This command is sent as part of station initialization right |