1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 ******************************************************************************/
23 #include <osdep_service.h>
24 #include <drv_types.h>
26 #define IOREG_CMD_END_LEN 4
38 IOREG_CMD_REFUSE = 0x02,
39 IOREG_CMD_EFUSE_PATH = 0x03,
40 IOREG_CMD_WB_REG = 0x04,
41 IOREG_CMD_WW_REG = 0x05,
42 IOREG_CMD_WD_REG = 0x06,
43 IOREG_CMD_W_RF = 0x07,
44 IOREG_CMD_DELAY_US = 0x10,
45 IOREG_CMD_DELAY_MS = 0x11,
49 struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter);
50 int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds,
52 int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary);
53 int rtw_IOL_exec_cmds_sync(struct adapter *adapter,
54 struct xmit_frame *xmit_frame, u32 max_wating_ms,
56 bool rtw_IOL_applied(struct adapter *adapter);
57 int rtw_IOL_append_DELAY_US_cmd(struct xmit_frame *xmit_frame, u16 us);
58 int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms);
59 int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame);
61 void read_efuse_from_txpktbuf(struct adapter *adapter, int bcnhead,
62 u8 *content, u16 *size);
64 int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr,
66 int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr,
68 int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr,
70 int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path,
71 u16 addr, u32 value, u32 mask);
72 #define rtw_IOL_append_WB_cmd(xmit_frame, addr, value, mask) \
73 _rtw_IOL_append_WB_cmd((xmit_frame), (addr), (value) , (mask))
74 #define rtw_IOL_append_WW_cmd(xmit_frame, addr, value, mask) \
75 _rtw_IOL_append_WW_cmd((xmit_frame), (addr), (value), (mask))
76 #define rtw_IOL_append_WD_cmd(xmit_frame, addr, value, mask) \
77 _rtw_IOL_append_WD_cmd((xmit_frame), (addr), (value), (mask))
78 #define rtw_IOL_append_WRF_cmd(xmit_frame, rf_path, addr, value, mask) \
79 _rtw_IOL_append_WRF_cmd((xmit_frame), (rf_path), (addr), (value), (mask))
81 u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame);
82 void rtw_IOL_cmd_buf_dump(struct adapter *Adapter, int buf_len, u8 *pbuf);
84 #endif /* __RTW_IOL_H_ */