Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rt2x00debug.c File Reference
#include <linux/debugfs.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include "rt2x00.h"
#include "rt2x00lib.h"
#include "rt2x00dump.h"

Go to the source code of this file.

Data Structures

struct  rt2x00debug_crypto
 
struct  rt2x00debug_intf
 

Macros

#define MAX_LINE_LENGTH   64
 
#define FRAME_DUMP_FILE_OPEN   1
 
#define RT2X00DEBUGFS_OPS_READ(__name, __format, __type)
 
#define RT2X00DEBUGFS_OPS_WRITE(__name, __type)
 
#define RT2X00DEBUGFS_OPS(__name, __format, __type)
 
#define RT2X00DEBUGFS_SPRINTF_REGISTER(__name)
 
#define RT2X00DEBUGFS_CREATE_REGISTER_ENTRY(__intf, __name)
 

Functions

void rt2x00debug_update_crypto (struct rt2x00_dev *rt2x00dev, struct rxdone_entry_desc *rxdesc)
 
void rt2x00debug_dump_frame (struct rt2x00_dev *rt2x00dev, enum rt2x00_dump_type type, struct sk_buff *skb)
 
 EXPORT_SYMBOL_GPL (rt2x00debug_dump_frame)
 
 RT2X00DEBUGFS_OPS (csr,"0x%.8x\n", u32)
 
 RT2X00DEBUGFS_OPS (eeprom,"0x%.4x\n", u16)
 
 RT2X00DEBUGFS_OPS (bbp,"0x%.2x\n", u8)
 
 RT2X00DEBUGFS_OPS (rf,"0x%.8x\n", u32)
 
 RT2X00DEBUGFS_OPS (rfcsr,"0x%.2x\n", u8)
 
void rt2x00debug_register (struct rt2x00_dev *rt2x00dev)
 
void rt2x00debug_deregister (struct rt2x00_dev *rt2x00dev)
 

Macro Definition Documentation

#define FRAME_DUMP_FILE_OPEN   1

Definition at line 105 of file rt2x00debug.c.

#define MAX_LINE_LENGTH   64

Definition at line 38 of file rt2x00debug.c.

#define RT2X00DEBUGFS_CREATE_REGISTER_ENTRY (   __intf,
  __name 
)
Value:
({ \
if(debug->__name.read) { \
(__intf)->__name##_off_entry = \
debugfs_create_u32(__stringify(__name) "_offset", \
S_IRUSR | S_IWUSR, \
(__intf)->register_folder, \
&(__intf)->offset_##__name); \
if (IS_ERR((__intf)->__name##_off_entry) \
|| !(__intf)->__name##_off_entry) \
goto exit; \
\
(__intf)->__name##_val_entry = \
debugfs_create_file(__stringify(__name) "_value", \
S_IRUSR | S_IWUSR, \
(__intf)->register_folder, \
(__intf), &rt2x00debug_fop_##__name); \
if (IS_ERR((__intf)->__name##_val_entry) \
|| !(__intf)->__name##_val_entry) \
goto exit; \
} \
})
#define RT2X00DEBUGFS_OPS (   __name,
  __format,
  __type 
)
Value:
RT2X00DEBUGFS_OPS_READ(__name, __format, __type); \
RT2X00DEBUGFS_OPS_WRITE(__name, __type); \
\
static const struct file_operations rt2x00debug_fop_##__name = {\
.read = rt2x00debug_read_##__name, \
.write = rt2x00debug_write_##__name, \
.open = rt2x00debug_file_open, \
.release = rt2x00debug_file_release, \
.llseek = generic_file_llseek, \
};

Definition at line 515 of file rt2x00debug.c.

#define RT2X00DEBUGFS_OPS_READ (   __name,
  __format,
  __type 
)

Definition at line 439 of file rt2x00debug.c.

#define RT2X00DEBUGFS_OPS_WRITE (   __name,
  __type 
)

Definition at line 475 of file rt2x00debug.c.

#define RT2X00DEBUGFS_SPRINTF_REGISTER (   __name)
Value:
{ \
if(debug->__name.read) \
"\t%d\t%d\t%d\n", \
debug->__name.word_base, \
debug->__name.word_count, \
debug->__name.word_size); \
}

Function Documentation

EXPORT_SYMBOL_GPL ( rt2x00debug_dump_frame  )
void rt2x00debug_deregister ( struct rt2x00_dev rt2x00dev)

Definition at line 766 of file rt2x00debug.c.

void rt2x00debug_dump_frame ( struct rt2x00_dev rt2x00dev,
enum rt2x00_dump_type  type,
struct sk_buff skb 
)

Definition at line 161 of file rt2x00debug.c.

void rt2x00debug_register ( struct rt2x00_dev rt2x00dev)

Definition at line 653 of file rt2x00debug.c.

void rt2x00debug_update_crypto ( struct rt2x00_dev rt2x00dev,
struct rxdone_entry_desc rxdesc 
)

Definition at line 140 of file rt2x00debug.c.

RT2X00DEBUGFS_OPS ( csr  ,
"0x%.8x\n"  ,
u32   
)
RT2X00DEBUGFS_OPS ( eeprom  ,
"0x%.4x\n"  ,
u16   
)
RT2X00DEBUGFS_OPS ( bbp  ,
"0x%.2x\n"  ,
u8   
)
RT2X00DEBUGFS_OPS ( rf  ,
"0x%.8x\n"  ,
u32   
)
RT2X00DEBUGFS_OPS ( rfcsr  ,
"0x%.2x\n"  ,
u8   
)