diff options
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 |