diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-11-25 16:38:34 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-11-30 17:54:59 +0300 |
commit | 3e58044b61a92ad63e52b347782248659b6b6f12 (patch) | |
tree | b90f904cf0d9bb73f1e5f908c80ba681e3f9c8e3 /drivers/net/wireless/ath/ath10k/debug.c | |
parent | 23f591ea9b1c8ce7ddfbf14ffd972c8f33677b2d (diff) | |
download | linux-3e58044b61a92ad63e52b347782248659b6b6f12.tar.xz |
ath10k: print crc32 checksums for firmware and board files
To detect cases if the firmare or board file is corrupted or otherwise modified print crc32 value
of both. Now the output looks like:
ath10k_pci 0000:02:00.0: pci irq msi interrupts 1 irq_mode 0 reset_mode 0
ath10k_pci 0000:02:00.0: qca99x0 hw2.0 target 0x01000000 chip_id 0x003801ff sub 168c:0002
ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 1
ath10k_pci 0000:02:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01
ath10k_pci 0000:02:00.0: board_file api 1 bmi_id 1:1 crc32 7e56fd07
ath10k_pci 0000:02:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index ea8b562aca8d..4fc3d4fcfa8f 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -19,6 +19,8 @@ #include <linux/debugfs.h> #include <linux/vmalloc.h> #include <linux/utsname.h> +#include <linux/crc32.h> +#include <linux/firmware.h> #include "core.h" #include "debug.h" @@ -141,10 +143,11 @@ void ath10k_debug_print_hwfw_info(struct ath10k *ar) config_enabled(CONFIG_ATH10K_DFS_CERTIFIED), config_enabled(CONFIG_NL80211_TESTMODE)); - ath10k_info(ar, "firmware ver %s api %d features %s\n", + ath10k_info(ar, "firmware ver %s api %d features %s crc32 %08x\n", ar->hw->wiphy->fw_version, ar->fw_api, - fw_features); + fw_features, + crc32_le(0, ar->firmware->data, ar->firmware->size)); } void ath10k_debug_print_board_info(struct ath10k *ar) @@ -157,9 +160,10 @@ void ath10k_debug_print_board_info(struct ath10k *ar) else scnprintf(boardinfo, sizeof(boardinfo), "N/A"); - ath10k_info(ar, "board_file api %d bmi_id %s", + ath10k_info(ar, "board_file api %d bmi_id %s crc32 %08x", ar->bd_api, - boardinfo); + boardinfo, + crc32_le(0, ar->board->data, ar->board->size)); } void ath10k_debug_print_boot_info(struct ath10k *ar) |