From 427ab12050ae54de2943e8c84383856ab3d444f2 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 28 Feb 2015 16:12:47 -0600 Subject: [PATCH] rtl8188eu: Remove CONFIG_IOL_NEW_GENERATION This one is selected by defining CONFIG_IOL. Signed-off-by: Larry Finger --- core/rtw_iol.c | 123 ------------------------------------------- include/autoconf.h | 1 - include/rtw_iol.h | 60 --------------------- os_dep/ioctl_linux.c | 20 ------- 4 files changed, 204 deletions(-) diff --git a/core/rtw_iol.c b/core/rtw_iol.c index 4144c0d..888e53f 100755 --- a/core/rtw_iol.c +++ b/core/rtw_iol.c @@ -111,7 +111,6 @@ int rtw_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_frame *xmit_fram return rtw_hal_iol_cmd(adapter, xmit_frame, max_wating_ms,bndy_cnt); } -#ifdef CONFIG_IOL_NEW_GENERATION int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary) { return _SUCCESS; @@ -261,126 +260,4 @@ void rtw_IOL_cmd_buf_dump(struct adapter *Adapter,int buf_len,u8 *pbuf) printk("============= ioreg_cmd len = %d =============== \n",buf_len); } - -#else /* CONFIG_IOL_NEW_GENERATION */ -int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary) -{ - IOL_CMD cmd = {0x0, IOL_CMD_LLT, 0x0, 0x0}; - - RTW_PUT_BE32((u8*)&cmd.value, (u32)page_boundary); - - return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 8); -} - -int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value) -{ - IOL_CMD cmd = {0x0, IOL_CMD_WB_REG, 0x0, 0x0}; - - RTW_PUT_BE16((u8*)&cmd.address, (u16)addr); - RTW_PUT_BE32((u8*)&cmd.value, (u32)value); - - return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 8); -} - -int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value) -{ - IOL_CMD cmd = {0x0, IOL_CMD_WW_REG, 0x0, 0x0}; - - RTW_PUT_BE16((u8*)&cmd.address, (u16)addr); - RTW_PUT_BE32((u8*)&cmd.value, (u32)value); - - return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 8); -} - -int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value) -{ - IOL_CMD cmd = {0x0, IOL_CMD_WD_REG, 0x0, 0x0}; - u8* pos = (u8 *)&cmd; - - RTW_PUT_BE16((u8*)&cmd.address, (u16)addr); - RTW_PUT_BE32((u8*)&cmd.value, (u32)value); - - return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 8); -} - -#ifdef DBG_IO -int dbg_rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, const char *caller, const int line) -{ - if (match_write_sniff_ranges(addr, 1)) - DBG_871X("DBG_IO %s:%d IOL_WB(0x%04x, 0x%02x)\n", caller, line, addr, value); - - return _rtw_IOL_append_WB_cmd(xmit_frame, addr, value); -} - -int dbg_rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value, const char *caller, const int line) -{ - if (match_write_sniff_ranges(addr, 2)) - DBG_871X("DBG_IO %s:%d IOL_WW(0x%04x, 0x%04x)\n", caller, line, addr, value); - - return _rtw_IOL_append_WW_cmd(xmit_frame, addr, value); -} - -int dbg_rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, const char *caller, const int line) -{ - if (match_write_sniff_ranges(addr, 4)) - DBG_871X("DBG_IO %s:%d IOL_WD(0x%04x, 0x%08x)\n", caller, line, addr, value); - - return _rtw_IOL_append_WD_cmd(xmit_frame, addr, value); -} -#endif - -int rtw_IOL_append_DELAY_US_cmd(struct xmit_frame *xmit_frame, u16 us) -{ - IOL_CMD cmd = {0x0, IOL_CMD_DELAY_US, 0x0, 0x0}; - - RTW_PUT_BE32((u8*)&cmd.value, (u32)us); - - /* DBG_871X("%s %u\n", __FUNCTION__, us); */ - - return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 8); -} - -int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms) -{ - IOL_CMD cmd = {0x0, IOL_CMD_DELAY_MS, 0x0, 0x0}; - - RTW_PUT_BE32((u8*)&cmd.value, (u32)ms); - - /* DBG_871X("%s %u\n", __FUNCTION__, ms); */ - - return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 8); -} - -int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame) -{ - IOL_CMD end_cmd = {0x0, IOL_CMD_END, 0x0, 0x0}; - - - return rtw_IOL_append_cmds(xmit_frame, (u8*)&end_cmd, 8); - -} - -int rtw_IOL_exec_cmd_array_sync(Pstruct adapter adapter, u8 *IOL_cmds, u32 cmd_num, u32 max_wating_ms) -{ - struct xmit_frame *xmit_frame; - - if((xmit_frame=rtw_IOL_accquire_xmit_frame(adapter)) == NULL) - return _FAIL; - - if(rtw_IOL_append_cmds(xmit_frame, IOL_cmds, cmd_num<<3) == _FAIL) - return _FAIL; - - return rtw_IOL_exec_cmds_sync(adapter, xmit_frame, max_wating_ms,0); -} - -int rtw_IOL_exec_empty_cmds_sync(struct adapter *adapter, u32 max_wating_ms) -{ - IOL_CMD end_cmd = {0x0, IOL_CMD_END, 0x0, 0x0}; - return rtw_IOL_exec_cmd_array_sync(adapter, (u8*)&end_cmd, 1, max_wating_ms); -} -#endif /* CONFIG_IOL_NEW_GENERATION */ - - - - #endif /* CONFIG_IOL */ diff --git a/include/autoconf.h b/include/autoconf.h index b229aee..ecd830d 100755 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -58,7 +58,6 @@ #endif // CONFIG_LED #ifdef CONFIG_IOL - #define CONFIG_IOL_NEW_GENERATION #define CONFIG_IOL_READ_EFUSE_MAP #define CONFIG_IOL_EFUSE_PATCH #endif diff --git a/include/rtw_iol.h b/include/rtw_iol.h index 028e928..a1c5e05 100755 --- a/include/rtw_iol.h +++ b/include/rtw_iol.h @@ -33,7 +33,6 @@ int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms); int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame); -#ifdef CONFIG_IOL_NEW_GENERATION #define IOREG_CMD_END_LEN 4 struct ioreg_cfg{ @@ -76,63 +75,4 @@ void rtw_IOL_cmd_buf_dump(struct adapter *Adapter,int buf_len,u8 *pbuf); }; #endif -#else //CONFIG_IOL_NEW_GENERATION - -typedef struct _io_offload_cmd { - u8 rsvd0; - u8 cmd; - u16 address; - u32 value; -} IO_OFFLOAD_CMD, IOL_CMD; - -#define IOL_CMD_LLT 0x00 -//#define IOL_CMD_R_EFUSE 0x01 -#define IOL_CMD_WB_REG 0x02 -#define IOL_CMD_WW_REG 0x03 -#define IOL_CMD_WD_REG 0x04 -//#define IOL_CMD_W_RF 0x05 -#define IOL_CMD_DELAY_US 0x80 -#define IOL_CMD_DELAY_MS 0x81 -//#define IOL_CMD_DELAY_S 0x82 -#define IOL_CMD_END 0x83 - -/***************************************************** -CMD Address Value -(B1) (B2/B3:H/L addr) (B4:B7 : MSB:LSB) -****************************************************** -IOL_CMD_LLT - B7: PGBNDY -//IOL_CMD_R_EFUSE - - -IOL_CMD_WB_REG 0x0~0xFFFF B7 -IOL_CMD_WW_REG 0x0~0xFFFF B6~B7 -IOL_CMD_WD_REG 0x0~0xFFFF B4~B7 -//IOL_CMD_W_RF RF Reg B5~B7 -IOL_CMD_DELAY_US - B6~B7 -IOL_CMD_DELAY_MS - B6~B7 -//IOL_CMD_DELAY_S - B6~B7 -IOL_CMD_END - - -******************************************************/ -int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value); -int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value); -int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value); - - -int rtw_IOL_exec_cmd_array_sync(struct adapter *adapter, u8 *IOL_cmds, u32 cmd_num, u32 max_wating_ms); -int rtw_IOL_exec_empty_cmds_sync(struct adapter *adapter, u32 max_wating_ms); - -#ifdef DBG_IO -int dbg_rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, const char *caller, const int line); -int dbg_rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value, const char *caller, const int line); -int dbg_rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, const char *caller, const int line); -#define rtw_IOL_append_WB_cmd(xmit_frame, addr, value) dbg_rtw_IOL_append_WB_cmd((xmit_frame), (addr), (value), __FUNCTION__, __LINE__) -#define rtw_IOL_append_WW_cmd(xmit_frame, addr, value) dbg_rtw_IOL_append_WW_cmd((xmit_frame), (addr), (value), __FUNCTION__, __LINE__) -#define rtw_IOL_append_WD_cmd(xmit_frame, addr, value) dbg_rtw_IOL_append_WD_cmd((xmit_frame), (addr), (value), __FUNCTION__, __LINE__) -#else -#define rtw_IOL_append_WB_cmd(xmit_frame, addr, value) _rtw_IOL_append_WB_cmd((xmit_frame), (addr), (value)) -#define rtw_IOL_append_WW_cmd(xmit_frame, addr, value) _rtw_IOL_append_WW_cmd((xmit_frame), (addr), (value)) -#define rtw_IOL_append_WD_cmd(xmit_frame, addr, value) _rtw_IOL_append_WD_cmd((xmit_frame), (addr), (value)) -#endif // DBG_IO -#endif // CONFIG_IOL_NEW_GENERATION - - - #endif //__RTW_IOL_H_ diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index e9bbc1a..6b1c37d 100755 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -5948,24 +5948,16 @@ static int rtw_dbg_port(struct net_device *dev, } for(i=0;i