iwlwifi: add utility to print buffer when error occurs
authorReinette Chatre <reinette.chatre@intel.com>
Fri, 26 Jun 2009 18:00:54 +0000 (11:00 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 Jul 2009 19:02:26 +0000 (15:02 -0400)
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-debug.h

index 2cf014f523bee44ec608ee3372e0558a76cd095a..65bbce0f17178aab9ee407d1f8ce52562b79f610 100644 (file)
@@ -36,6 +36,12 @@ struct iwl_priv;
 #define IWL_INFO(p, f, a...) dev_info(&((p)->pci_dev->dev), f, ## a)
 #define IWL_CRIT(p, f, a...) dev_crit(&((p)->pci_dev->dev), f, ## a)
 
+#define iwl_print_hex_error(priv, p, len)                              \
+do {                                                                   \
+       print_hex_dump(KERN_ERR, "iwl data: ",                          \
+                      DUMP_PREFIX_OFFSET, 16, 1, p, len, 1);           \
+} while (0)
+
 #ifdef CONFIG_IWLWIFI_DEBUG
 #define IWL_DEBUG(__priv, level, fmt, args...)                         \
 do {                                                                   \