diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-08-02 15:37:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-02 15:37:34 -0400 |
commit | 204162296edf0d0ac3e4dfd5bd0cac4af731b583 (patch) | |
tree | fdf941fd23fae6097500db4998d4ca96467fc352 /drivers/net/wireless/iwlwifi/mvm/utils.c | |
parent | e3d5291436ff9efeeb968459724af5332305dded (diff) | |
parent | 147fc9be81d10e6e863323c0b54e140b42fd1ed6 (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
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) | |||
453 | IWL_ERR(mvm, "0x%08X | flow_handler\n", table.flow_handler); | 453 | IWL_ERR(mvm, "0x%08X | flow_handler\n", table.flow_handler); |
454 | } | 454 | } |
455 | 455 | ||
456 | void iwl_mvm_dump_sram(struct iwl_mvm *mvm) | ||
457 | { | ||
458 | const struct fw_img *img; | ||
459 | int ofs, len = 0; | ||
460 | u8 *buf; | ||
461 | |||
462 | if (!mvm->ucode_loaded) | ||
463 | return; | ||
464 | |||
465 | img = &mvm->fw->img[mvm->cur_ucode]; | ||
466 | ofs = img->sec[IWL_UCODE_SECTION_DATA].offset; | ||
467 | len = img->sec[IWL_UCODE_SECTION_DATA].len; | ||
468 | |||
469 | buf = kzalloc(len, GFP_KERNEL); | ||
470 | if (!buf) | ||
471 | return; | ||
472 | |||
473 | iwl_trans_read_mem_bytes(mvm->trans, ofs, buf, len); | ||
474 | iwl_print_hex_error(mvm->trans, buf, len); | ||
475 | |||
476 | kfree(buf); | ||
477 | } | ||
478 | |||
456 | /** | 479 | /** |
457 | * iwl_mvm_send_lq_cmd() - Send link quality command | 480 | * iwl_mvm_send_lq_cmd() - Send link quality command |
458 | * @init: This command is sent as part of station initialization right | 481 | * @init: This command is sent as part of station initialization right |