mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-28 23:23:40 +00:00
rtl8188eu: Remove DBG_IOL_READ_EFUSE_MAP, DBG_IOCTL, and DBG_IO
All three of these are not defined. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
d4229b4bf1
commit
d76c2ca5f6
4 changed files with 1 additions and 189 deletions
|
@ -335,96 +335,3 @@ int rtw_init_io_priv(_adapter *padapter, void (*set_intf_ops)(struct _io_ops *po
|
||||||
|
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DBG_IO
|
|
||||||
|
|
||||||
u16 read_sniff_ranges[][2] = {
|
|
||||||
};
|
|
||||||
|
|
||||||
u16 write_sniff_ranges[][2] = {
|
|
||||||
};
|
|
||||||
|
|
||||||
int read_sniff_num = sizeof(read_sniff_ranges)/sizeof(u16)/2;
|
|
||||||
int write_sniff_num = sizeof(write_sniff_ranges)/sizeof(u16)/2;
|
|
||||||
|
|
||||||
bool match_read_sniff_ranges(u16 addr, u16 len)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i<read_sniff_num; i++) {
|
|
||||||
if (addr + len > read_sniff_ranges[i][0] && addr <= read_sniff_ranges[i][1])
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool match_write_sniff_ranges(u16 addr, u16 len)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i = 0; i<write_sniff_num; i++) {
|
|
||||||
if (addr + len > write_sniff_ranges[i][0] && addr <= write_sniff_ranges[i][1])
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line)
|
|
||||||
{
|
|
||||||
u8 val = _rtw_read8(adapter, addr);
|
|
||||||
|
|
||||||
if (match_read_sniff_ranges(addr, 1))
|
|
||||||
DBG_88E("DBG_IO %s:%d rtw_read8(0x%04x) return 0x%02x\n", caller, line, addr, val);
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
u16 dbg_rtw_read16(_adapter *adapter, u32 addr, const char *caller, const int line)
|
|
||||||
{
|
|
||||||
u16 val = _rtw_read16(adapter, addr);
|
|
||||||
|
|
||||||
if (match_read_sniff_ranges(addr, 2))
|
|
||||||
DBG_88E("DBG_IO %s:%d rtw_read16(0x%04x) return 0x%04x\n", caller, line, addr, val);
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
u32 dbg_rtw_read32(_adapter *adapter, u32 addr, const char *caller, const int line)
|
|
||||||
{
|
|
||||||
u32 val = _rtw_read32(adapter, addr);
|
|
||||||
|
|
||||||
if (match_read_sniff_ranges(addr, 4))
|
|
||||||
DBG_88E("DBG_IO %s:%d rtw_read32(0x%04x) return 0x%08x\n", caller, line, addr, val);
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
int dbg_rtw_write8(_adapter *adapter, u32 addr, u8 val, const char *caller, const int line)
|
|
||||||
{
|
|
||||||
if (match_write_sniff_ranges(addr, 1))
|
|
||||||
DBG_88E("DBG_IO %s:%d rtw_write8(0x%04x, 0x%02x)\n", caller, line, addr, val);
|
|
||||||
|
|
||||||
return _rtw_write8(adapter, addr, val);
|
|
||||||
}
|
|
||||||
int dbg_rtw_write16(_adapter *adapter, u32 addr, u16 val, const char *caller, const int line)
|
|
||||||
{
|
|
||||||
if (match_write_sniff_ranges(addr, 2))
|
|
||||||
DBG_88E("DBG_IO %s:%d rtw_write16(0x%04x, 0x%04x)\n", caller, line, addr, val);
|
|
||||||
|
|
||||||
return _rtw_write16(adapter, addr, val);
|
|
||||||
}
|
|
||||||
int dbg_rtw_write32(_adapter *adapter, u32 addr, u32 val, const char *caller, const int line)
|
|
||||||
{
|
|
||||||
if (match_write_sniff_ranges(addr, 4))
|
|
||||||
DBG_88E("DBG_IO %s:%d rtw_write32(0x%04x, 0x%08x)\n", caller, line, addr, val);
|
|
||||||
|
|
||||||
return _rtw_write32(adapter, addr, val);
|
|
||||||
}
|
|
||||||
int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, const char *caller, const int line)
|
|
||||||
{
|
|
||||||
if (match_write_sniff_ranges(addr, length))
|
|
||||||
DBG_88E("DBG_IO %s:%d rtw_writeN(0x%04x, %u)\n", caller, line, addr, length);
|
|
||||||
|
|
||||||
return _rtw_writeN(adapter, addr, length, data);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1234,20 +1234,8 @@ Hal_EfuseSwitchToBank(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void ReadEFuseByIC(PADAPTER Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool bPseudoTest)
|
||||||
ReadEFuseByIC(
|
|
||||||
PADAPTER Adapter,
|
|
||||||
u8 efuseType,
|
|
||||||
u16 _offset,
|
|
||||||
u16 _size_byte,
|
|
||||||
u8 *pbuf,
|
|
||||||
bool bPseudoTest
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
#ifdef DBG_IOL_READ_EFUSE_MAP
|
|
||||||
u8 logical_map[512];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!bPseudoTest )/* rtw_IOL_applied(Adapter)) */
|
if (!bPseudoTest )/* rtw_IOL_applied(Adapter)) */
|
||||||
{
|
{
|
||||||
int ret = _FAIL;
|
int ret = _FAIL;
|
||||||
|
@ -1256,11 +1244,7 @@ ReadEFuseByIC(
|
||||||
rtw_hal_power_on(Adapter);
|
rtw_hal_power_on(Adapter);
|
||||||
|
|
||||||
iol_mode_enable(Adapter, 1);
|
iol_mode_enable(Adapter, 1);
|
||||||
#ifdef DBG_IOL_READ_EFUSE_MAP
|
|
||||||
iol_read_efuse(Adapter, 0, _offset, _size_byte, logical_map);
|
|
||||||
#else
|
|
||||||
ret = iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf);
|
ret = iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf);
|
||||||
#endif
|
|
||||||
iol_mode_enable(Adapter, 0);
|
iol_mode_enable(Adapter, 0);
|
||||||
|
|
||||||
if (_SUCCESS == ret)
|
if (_SUCCESS == ret)
|
||||||
|
@ -1270,24 +1254,6 @@ ReadEFuseByIC(
|
||||||
Hal_EfuseReadEFuse88E(Adapter, _offset, _size_byte, pbuf, bPseudoTest);
|
Hal_EfuseReadEFuse88E(Adapter, _offset, _size_byte, pbuf, bPseudoTest);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
#ifdef DBG_IOL_READ_EFUSE_MAP
|
|
||||||
if (_rtw_memcmp(logical_map, Adapter->eeprompriv.efuse_eeprom_data, 0x130) == false)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
DBG_88E("%s compare first 0x130 byte fail\n", __func__);
|
|
||||||
for (i=0;i<512;i++)
|
|
||||||
{
|
|
||||||
if (i%16==0)
|
|
||||||
DBG_88E("0x%03x: ", i);
|
|
||||||
DBG_88E("%02x ", logical_map[i]);
|
|
||||||
if (i%16==15)
|
|
||||||
DBG_88E("\n");
|
|
||||||
}
|
|
||||||
DBG_88E("\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -343,40 +343,6 @@ extern u32 _rtw_write_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||||
u32 _rtw_write_port_and_wait(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem, int timeout_ms);
|
u32 _rtw_write_port_and_wait(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem, int timeout_ms);
|
||||||
extern void _rtw_write_port_cancel(_adapter *adapter);
|
extern void _rtw_write_port_cancel(_adapter *adapter);
|
||||||
|
|
||||||
#ifdef DBG_IO
|
|
||||||
bool match_read_sniff_ranges(u16 addr, u16 len);
|
|
||||||
bool match_write_sniff_ranges(u16 addr, u16 len);
|
|
||||||
|
|
||||||
extern u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line);
|
|
||||||
extern u16 dbg_rtw_read16(_adapter *adapter, u32 addr, const char *caller, const int line);
|
|
||||||
extern u32 dbg_rtw_read32(_adapter *adapter, u32 addr, const char *caller, const int line);
|
|
||||||
|
|
||||||
extern int dbg_rtw_write8(_adapter *adapter, u32 addr, u8 val, const char *caller, const int line);
|
|
||||||
extern int dbg_rtw_write16(_adapter *adapter, u32 addr, u16 val, const char *caller, const int line);
|
|
||||||
extern int dbg_rtw_write32(_adapter *adapter, u32 addr, u32 val, const char *caller, const int line);
|
|
||||||
extern int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, const char *caller, const int line);
|
|
||||||
|
|
||||||
#define rtw_read8(adapter, addr) dbg_rtw_read8((adapter), (addr), __func__, __LINE__)
|
|
||||||
#define rtw_read16(adapter, addr) dbg_rtw_read16((adapter), (addr), __func__, __LINE__)
|
|
||||||
#define rtw_read32(adapter, addr) dbg_rtw_read32((adapter), (addr), __func__, __LINE__)
|
|
||||||
#define rtw_read_mem(adapter, addr, cnt, mem) _rtw_read_mem((adapter), (addr), (cnt), (mem))
|
|
||||||
#define rtw_read_port(adapter, addr, cnt, mem) _rtw_read_port((adapter), (addr), (cnt), (mem))
|
|
||||||
#define rtw_read_port_cancel(adapter) _rtw_read_port_cancel((adapter))
|
|
||||||
|
|
||||||
#define rtw_write8(adapter, addr, val) dbg_rtw_write8((adapter), (addr), (val), __func__, __LINE__)
|
|
||||||
#define rtw_write16(adapter, addr, val) dbg_rtw_write16((adapter), (addr), (val), __func__, __LINE__)
|
|
||||||
#define rtw_write32(adapter, addr, val) dbg_rtw_write32((adapter), (addr), (val), __func__, __LINE__)
|
|
||||||
#define rtw_writeN(adapter, addr, length, data) dbg_rtw_writeN((adapter), (addr), (length), (data), __func__, __LINE__)
|
|
||||||
|
|
||||||
#define rtw_write8_async(adapter, addr, val) _rtw_write8_async((adapter), (addr), (val))
|
|
||||||
#define rtw_write16_async(adapter, addr, val) _rtw_write16_async((adapter), (addr), (val))
|
|
||||||
#define rtw_write32_async(adapter, addr, val) _rtw_write32_async((adapter), (addr), (val))
|
|
||||||
|
|
||||||
#define rtw_write_mem(adapter, addr, cnt, mem) _rtw_write_mem((adapter), addr, cnt, mem)
|
|
||||||
#define rtw_write_port(adapter, addr, cnt, mem) _rtw_write_port(adapter, addr, cnt, mem)
|
|
||||||
#define rtw_write_port_and_wait(adapter, addr, cnt, mem, timeout_ms) _rtw_write_port_and_wait((adapter), (addr), (cnt), (mem), (timeout_ms))
|
|
||||||
#define rtw_write_port_cancel(adapter) _rtw_write_port_cancel(adapter)
|
|
||||||
#else //DBG_IO
|
|
||||||
#define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr))
|
#define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr))
|
||||||
#define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr))
|
#define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr))
|
||||||
#define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr))
|
#define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr))
|
||||||
|
@ -397,7 +363,6 @@ extern int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, co
|
||||||
#define rtw_write_port(adapter, addr, cnt, mem) _rtw_write_port((adapter), (addr), (cnt), (mem))
|
#define rtw_write_port(adapter, addr, cnt, mem) _rtw_write_port((adapter), (addr), (cnt), (mem))
|
||||||
#define rtw_write_port_and_wait(adapter, addr, cnt, mem, timeout_ms) _rtw_write_port_and_wait((adapter), (addr), (cnt), (mem), (timeout_ms))
|
#define rtw_write_port_and_wait(adapter, addr, cnt, mem, timeout_ms) _rtw_write_port_and_wait((adapter), (addr), (cnt), (mem), (timeout_ms))
|
||||||
#define rtw_write_port_cancel(adapter) _rtw_write_port_cancel((adapter))
|
#define rtw_write_port_cancel(adapter) _rtw_write_port_cancel((adapter))
|
||||||
#endif //DBG_IO
|
|
||||||
|
|
||||||
extern void rtw_write_scsi(_adapter *adapter, u32 cnt, u8 *pmem);
|
extern void rtw_write_scsi(_adapter *adapter, u32 cnt, u8 *pmem);
|
||||||
|
|
||||||
|
|
|
@ -1590,11 +1590,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_set_scan\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_set_scan\n"));
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
#ifdef DBG_IOCTL
|
|
||||||
DBG_88E("DBG_IOCTL %s:%d\n",__func__, __LINE__);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (padapter->registrypriv.mp_mode == 1)
|
if (padapter->registrypriv.mp_mode == 1)
|
||||||
{
|
{
|
||||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||||
|
@ -1780,12 +1775,8 @@ _func_enter_;
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
#ifdef DBG_IOCTL
|
|
||||||
DBG_88E("DBG_IOCTL %s:%d return %d\n",__func__, __LINE__, ret);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1812,10 +1803,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
#ifdef DBG_IOCTL
|
|
||||||
DBG_88E("DBG_IOCTL %s:%d\n",__func__, __LINE__);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (padapter->pwrctrlpriv.brfoffbyhw && padapter->bDriverStopped)
|
if (padapter->pwrctrlpriv.brfoffbyhw && padapter->bDriverStopped)
|
||||||
{
|
{
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
@ -1883,11 +1870,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
#ifdef DBG_IOCTL
|
|
||||||
DBG_88E("DBG_IOCTL %s:%d return %d\n",__func__, __LINE__, ret);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return ret ;
|
return ret ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1916,10 +1898,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
#ifdef DBG_IOCTL
|
|
||||||
DBG_88E("DBG_IOCTL %s:%d\n",__func__, __LINE__);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_,
|
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_,
|
||||||
("+rtw_wx_set_essid: fw_state=0x%08x\n", get_fwstate(pmlmepriv)));
|
("+rtw_wx_set_essid: fw_state=0x%08x\n", get_fwstate(pmlmepriv)));
|
||||||
if (_FAIL == rtw_pwr_wakeup(padapter))
|
if (_FAIL == rtw_pwr_wakeup(padapter))
|
||||||
|
@ -2033,10 +2011,6 @@ exit:
|
||||||
|
|
||||||
DBG_88E("<=%s, ret %d\n",__func__, ret);
|
DBG_88E("<=%s, ret %d\n",__func__, ret);
|
||||||
|
|
||||||
#ifdef DBG_IOCTL
|
|
||||||
DBG_88E("DBG_IOCTL %s:%d return %d\n",__func__, __LINE__, ret);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue