#include "wifi.h"
#include "cam.h"
#include <linux/moduleparam.h>
#include <linux/vmalloc.h>
#ifdef CONFIG_RTLWIFI_DEBUG
void _rtl_dbg_print(struct rtl_priv *rtlpriv, u64 comp, int level,
const char *fmt, ...)
{ … }
EXPORT_SYMBOL_GPL(…);
void _rtl_dbg_print_data(struct rtl_priv *rtlpriv, u64 comp, int level,
const char *titlestring,
const void *hexdata, int hexdatalen)
{ … }
EXPORT_SYMBOL_GPL(…);
struct rtl_debugfs_priv { … };
static struct dentry *debugfs_topdir;
static int rtl_debug_get_common(struct seq_file *m, void *v)
{ … }
static int dl_debug_open_common(struct inode *inode, struct file *file)
{ … }
static const struct file_operations file_ops_common = …;
static int rtl_debug_get_mac_page(struct seq_file *m, void *v)
{ … }
#define RTL_DEBUG_IMPL_MAC_SERIES(page, addr) …
RTL_DEBUG_IMPL_MAC_SERIES(0, 0x0000);
RTL_DEBUG_IMPL_MAC_SERIES(1, 0x0100);
RTL_DEBUG_IMPL_MAC_SERIES(2, 0x0200);
RTL_DEBUG_IMPL_MAC_SERIES(3, 0x0300);
RTL_DEBUG_IMPL_MAC_SERIES(4, 0x0400);
RTL_DEBUG_IMPL_MAC_SERIES(5, 0x0500);
RTL_DEBUG_IMPL_MAC_SERIES(6, 0x0600);
RTL_DEBUG_IMPL_MAC_SERIES(7, 0x0700);
RTL_DEBUG_IMPL_MAC_SERIES(10, 0x1000);
RTL_DEBUG_IMPL_MAC_SERIES(11, 0x1100);
RTL_DEBUG_IMPL_MAC_SERIES(12, 0x1200);
RTL_DEBUG_IMPL_MAC_SERIES(13, 0x1300);
RTL_DEBUG_IMPL_MAC_SERIES(14, 0x1400);
RTL_DEBUG_IMPL_MAC_SERIES(15, 0x1500);
RTL_DEBUG_IMPL_MAC_SERIES(16, 0x1600);
RTL_DEBUG_IMPL_MAC_SERIES(17, 0x1700);
static int rtl_debug_get_bb_page(struct seq_file *m, void *v)
{ … }
#define RTL_DEBUG_IMPL_BB_SERIES(page, addr) …
RTL_DEBUG_IMPL_BB_SERIES(8, 0x0800);
RTL_DEBUG_IMPL_BB_SERIES(9, 0x0900);
RTL_DEBUG_IMPL_BB_SERIES(a, 0x0a00);
RTL_DEBUG_IMPL_BB_SERIES(b, 0x0b00);
RTL_DEBUG_IMPL_BB_SERIES(c, 0x0c00);
RTL_DEBUG_IMPL_BB_SERIES(d, 0x0d00);
RTL_DEBUG_IMPL_BB_SERIES(e, 0x0e00);
RTL_DEBUG_IMPL_BB_SERIES(f, 0x0f00);
RTL_DEBUG_IMPL_BB_SERIES(18, 0x1800);
RTL_DEBUG_IMPL_BB_SERIES(19, 0x1900);
RTL_DEBUG_IMPL_BB_SERIES(1a, 0x1a00);
RTL_DEBUG_IMPL_BB_SERIES(1b, 0x1b00);
RTL_DEBUG_IMPL_BB_SERIES(1c, 0x1c00);
RTL_DEBUG_IMPL_BB_SERIES(1d, 0x1d00);
RTL_DEBUG_IMPL_BB_SERIES(1e, 0x1e00);
RTL_DEBUG_IMPL_BB_SERIES(1f, 0x1f00);
static int rtl_debug_get_reg_rf(struct seq_file *m, void *v)
{ … }
#define RTL_DEBUG_IMPL_RF_SERIES(page, addr) …
RTL_DEBUG_IMPL_RF_SERIES(a, RF90_PATH_A);
RTL_DEBUG_IMPL_RF_SERIES(b, RF90_PATH_B);
static int rtl_debug_get_cam_register(struct seq_file *m, void *v)
{ … }
#define RTL_DEBUG_IMPL_CAM_SERIES(page, addr) …
RTL_DEBUG_IMPL_CAM_SERIES(1, 0);
RTL_DEBUG_IMPL_CAM_SERIES(2, 11);
RTL_DEBUG_IMPL_CAM_SERIES(3, 22);
static int rtl_debug_get_btcoex(struct seq_file *m, void *v)
{ … }
static struct rtl_debugfs_priv rtl_debug_priv_btcoex = …;
static ssize_t rtl_debugfs_set_write_reg(struct file *filp,
const char __user *buffer,
size_t count, loff_t *loff)
{ … }
static struct rtl_debugfs_priv rtl_debug_priv_write_reg = …;
static ssize_t rtl_debugfs_set_write_h2c(struct file *filp,
const char __user *buffer,
size_t count, loff_t *loff)
{ … }
static struct rtl_debugfs_priv rtl_debug_priv_write_h2c = …;
static ssize_t rtl_debugfs_set_write_rfreg(struct file *filp,
const char __user *buffer,
size_t count, loff_t *loff)
{ … }
static struct rtl_debugfs_priv rtl_debug_priv_write_rfreg = …;
static int rtl_debugfs_close(struct inode *inode, struct file *filp)
{ … }
static ssize_t rtl_debugfs_common_write(struct file *filp,
const char __user *buffer,
size_t count, loff_t *loff)
{ … }
static const struct file_operations file_ops_common_write = …;
#define RTL_DEBUGFS_ADD_CORE(name, mode, fopname) …
#define RTL_DEBUGFS_ADD(name) …
#define RTL_DEBUGFS_ADD_W(name) …
void rtl_debug_add_one(struct ieee80211_hw *hw)
{ … }
EXPORT_SYMBOL_GPL(…);
void rtl_debug_remove_one(struct ieee80211_hw *hw)
{ … }
EXPORT_SYMBOL_GPL(…);
void rtl_debugfs_add_topdir(void)
{ … }
void rtl_debugfs_remove_topdir(void)
{ … }
#endif