⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bcm43xx_debugfs.h

📁 无线网卡驱动,有很好的参考价值,在linux_2.6.21下可以直接使用,如果在其他平台,可以参考移植
💻 H
字号:
#ifndef BCM43xx_DEBUGFS_H_#define BCM43xx_DEBUGFS_H_struct bcm43xx_private;struct bcm43xx_xmitstatus;#ifdef CONFIG_BCM43XX_DEBUG#include <linux/list.h>#include <asm/semaphore.h>struct dentry;/* limited by the size of the "really_big_buffer" */#define BCM43xx_NR_LOGGED_XMITSTATUS	100struct bcm43xx_dfsentry {	struct dentry *subdir;	struct dentry *dentry_devinfo;	struct dentry *dentry_spromdump;	struct dentry *dentry_tsf;	struct dentry *dentry_txstat;	struct dentry *dentry_restart;	struct bcm43xx_private *bcm;	/* saved xmitstatus. */	struct bcm43xx_xmitstatus *xmitstatus_buffer;	int xmitstatus_ptr;	int xmitstatus_cnt;	/* We need a seperate buffer while printing to avoid	 * concurrency issues. (New xmitstatus can arrive	 * while we are printing).	 */	struct bcm43xx_xmitstatus *xmitstatus_print_buffer;	int saved_xmitstatus_ptr;	int saved_xmitstatus_cnt;	int xmitstatus_printing;};struct bcm43xx_debugfs {	struct dentry *root;	struct dentry *dentry_driverinfo;};void bcm43xx_debugfs_init(void);void bcm43xx_debugfs_exit(void);void bcm43xx_debugfs_add_device(struct bcm43xx_private *bcm);void bcm43xx_debugfs_remove_device(struct bcm43xx_private *bcm);void bcm43xx_debugfs_log_txstat(struct bcm43xx_private *bcm,				struct bcm43xx_xmitstatus *status);/* Debug helper: Dump binary data through printk. */void bcm43xx_printk_dump(const char *data,			 size_t size,			 const char *description);/* Debug helper: Dump bitwise binary data through printk. */void bcm43xx_printk_bitdump(const unsigned char *data,			    size_t bytes, int msb_to_lsb,			    const char *description);#define bcm43xx_printk_bitdumpt(pointer, msb_to_lsb, description) \	do {									\		bcm43xx_printk_bitdump((const unsigned char *)(pointer),	\				       sizeof(*(pointer)),			\				       (msb_to_lsb),				\				       (description));				\	} while (0)#else /* CONFIG_BCM43XX_DEBUG*/static inlinevoid bcm43xx_debugfs_init(void) { }static inlinevoid bcm43xx_debugfs_exit(void) { }static inlinevoid bcm43xx_debugfs_add_device(struct bcm43xx_private *bcm) { }static inlinevoid bcm43xx_debugfs_remove_device(struct bcm43xx_private *bcm) { }static inlinevoid bcm43xx_debugfs_log_txstat(struct bcm43xx_private *bcm,				struct bcm43xx_xmitstatus *status) { }static inlinevoid bcm43xx_printk_dump(const char *data,			 size_t size,			 const char *description){}static inlinevoid bcm43xx_printk_bitdump(const unsigned char *data,			    size_t bytes, int msb_to_lsb,			    const char *description){}#define bcm43xx_printk_bitdumpt(pointer, msb_to_lsb, description)  do { /* nothing */ } while (0)#endif /* CONFIG_BCM43XX_DEBUG*//* Ugly helper macros to make incomplete code more verbose on runtime */#ifdef TODO# undef TODO#endif#define TODO()  \	do {										\		printk(KERN_INFO PFX "TODO: Incomplete code in %s() at %s:%d\n",	\		       __FUNCTION__, __FILE__, __LINE__);				\	} while (0)#ifdef FIXME# undef FIXME#endif#define FIXME()  \	do {										\		printk(KERN_INFO PFX "FIXME: Possibly broken code in %s() at %s:%d\n",	\		       __FUNCTION__, __FILE__, __LINE__);				\	} while (0)#endif /* BCM43xx_DEBUGFS_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -