Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 712b6cf5 authored by Tomas Winkler's avatar Tomas Winkler Committed by John W. Linville
Browse files

iwlwifi: Add debugfs to iwl core



This patch adds debugfs support to iwl core
currently only iwl4965 is supported

Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 19758bef
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -76,6 +76,12 @@ config IWLWIFI_DEBUG
	  as the debug information can assist others in helping you resolve
	  any problems you may encounter.

config IWLWIFI_DEBUGFS
        bool "Iwlwifi debugfs support"
        depends on IWLCORE && IWLWIFI_DEBUG && MAC80211_DEBUGFS
        ---help---
	  Enable creation of debugfs files for the iwlwifi drivers.

config IWL3945
	tristate "Intel PRO/Wireless 3945ABG/BG Network Connection"
	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
+4 −0
Original line number Diff line number Diff line
obj-$(CONFIG_IWLCORE)	+= iwlcore.o
iwlcore-objs 		= iwl-core.o iwl-eeprom.o

ifeq ($(CONFIG_IWLWIFI_DEBUGFS),y)
	iwlcore-objs += iwl-debugfs.o
endif

obj-$(CONFIG_IWL3945)	+= iwl3945.o
iwl3945-objs		= iwl3945-base.o iwl-3945.o iwl-3945-rs.o

+5 −1
Original line number Diff line number Diff line
@@ -1212,7 +1212,11 @@ struct iwl_priv {
	/* debugging info */
	u32 framecnt_to_us;
	atomic_t restrict_refcnt;
#endif
#ifdef CONFIG_IWLWIFI_DEBUGFS
	/* debugfs */
	struct iwl_debugfs *dbgfs;
#endif /* CONFIG_IWLWIFI_DEBUGFS */
#endif /* CONFIG_IWLWIFI_DEBUG */

	struct work_struct txpower_work;
#ifdef CONFIG_IWL4965_SENSITIVITY
+2 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/module.h>
#include <linux/version.h>

struct iwl_priv; /* FIXME: remove */
#include "iwl-debug.h"
#include "iwl-eeprom.h"
#include "iwl-core.h"
@@ -37,7 +38,7 @@
MODULE_DESCRIPTION("iwl core");
MODULE_VERSION(IWLWIFI_VERSION);
MODULE_AUTHOR(DRV_COPYRIGHT);
MODULE_LICENSE("GPL/BSD");
MODULE_LICENSE("GPL");

#ifdef CONFIG_IWLWIFI_DEBUG
u32 iwl_debug_level;
+30 −1
Original line number Diff line number Diff line
@@ -49,8 +49,27 @@ static inline void iwl_print_hex_dump(int level, void *p, u32 len)
	print_hex_dump(KERN_DEBUG, "iwl data: ", DUMP_PREFIX_OFFSET, 16, 1,
			p, len, 1);
}
#else

#ifdef CONFIG_IWLWIFI_DEBUGFS
struct iwl_debugfs {
	const char *name;
	struct dentry *dir_drv;
	struct dentry *dir_data;
	struct dir_data_files{
		struct dentry *file_sram;
		struct dentry *file_stations;
		struct dentry *file_rx_statistics;
		struct dentry *file_tx_statistics;
	} dbgfs_data_files;
	u32 sram_offset;
	u32 sram_len;
};

int iwl_dbgfs_register(struct iwl_priv *priv, const char *name);
void iwl_dbgfs_unregister(struct iwl_priv *priv);
#endif

#else
static inline void IWL_DEBUG(int level, const char *fmt, ...)
{
}
@@ -64,6 +83,16 @@ static inline void iwl_print_hex_dump(int level, void *p, u32 len)



#ifndef CONFIG_IWLWIFI_DEBUGFS
static inline int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
{
	return 0;
}
static inline void iwl_dbgfs_unregister(struct iwl_priv *priv)
{
}
#endif				/* CONFIG_IWLWIFI_DEBUGFS */

/*
 * To use the debug system;
 *
Loading