/******************************************************************************
*
* Copyright(c) 2009-2010 Realtek Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
* The full GNU General Public License is included in this distribution in the
* file called LICENSE.
*
* Contact Information:
* wlanfae <wlanfae@realtek.com>
* Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
* Hsinchu 300, Taiwan.
*
* Larry Finger <Larry.Finger@lwfinger.net>
*
*****************************************************************************/
#include "wifi.h"
#include "cam.h"
#define GET_INODE_DATA(__node) PDE_DATA(__node)
void rtl_dbgp_flag_init(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
u8 i;
rtlpriv->dbg.global_debuglevel = DBG_DMESG;
rtlpriv->dbg.global_debugcomponents =
COMP_ERR |
COMP_FW |
COMP_INIT |
COMP_RECV |
COMP_SEND |
COMP_MLME |
COMP_SCAN |
COMP_INTR |
COMP_LED |
COMP_SEC |
COMP_BEACON |
COMP_RATE |
COMP_RXDESC |
COMP_DIG |
COMP_TXAGC |
COMP_POWER |
COMP_POWER_TRACKING |
COMP_BB_POWERSAVING |
COMP_SWAS |
COMP_RF |
COMP_TURBO |
COMP_RATR |
COMP_CMD |
COMP_EASY_CONCURRENT |
COMP_EFUSE |
COMP_QOS | COMP_MAC80211 | COMP_REGD |
COMP_CHAN |
COMP_BT_COEXIST |
COMP_IQK |
0;
for (i = 0; i < DBGP_TYPE_MAX; i++)
rtlpriv->dbg.dbgp_type[i] = 0;
/*Init Debug flag enable condition */
}
struct proc_dir_entry *proc_topdir;
static int rtl_proc_get_mac_0(struct seq_file *m, void *v)
{
struct ieee80211_hw *hw = m->private;
struct rtl_priv *rtlpriv = rtl_priv(hw);
int i, n, page;
int max = 0xff;
page = 0x000;
for (n = 0; n <= max; ) {
seq_printf(m, "\n%8.8x ", n + page);
for (i = 0; i < 4 && n <= max; i++, n += 4)
seq_printf(m, "%8.8x ",
rtl_read_dword(rtlpriv, (page | n)));
}
seq_puts(m, "\n");
return 0;
}
static int dl_proc_open_mac_0(struct inode *inode, struct file *file)
{
return single_open(file, rtl_proc_get_mac_0, GET_INODE_DATA(inode));
}
static const struct file_operations file_ops_mac_0 = {
.open = dl_proc_open_mac_0,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
static int rtl_proc_get_mac_1(struct seq_file *m, void *v)
{
struct ieee80211_hw *hw = m->private;
struct rtl_priv *rtlpriv = rtl_priv(hw);
int i, n, page;
int max = 0xff;
page = 0x100;
for (n = 0; n <= max; ) {
seq_printf(m, "\n%8.8x ", n + page);
for (i = 0; i < 4 && n <= max; i++, n += 4)
seq_printf(m, "%8.8x ",
rtl_read_dword(rtlpriv, (page | n)));
}
seq_puts(m, "\n");
return 0;
}
static int dl_proc_open_mac_1(struct inode *inode, struct file *file)
{
return single_open(file, rtl_proc_get_mac_1, GET_INODE_DATA(inode));
}
static const struct file_operations file_ops_mac_1 = {
.open = dl_proc_open_mac_1,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
static int rtl_proc_get_mac_2(struct seq_file *m, void *v)
{
struct ieee80211_hw *hw = m->private;
struct rtl_priv *rtlpriv = rtl_priv(hw);
int i, n, page;
int max = 0xff;
page = 0x200;
for (n = 0; n