blob: bf68bbb41f9c253c90b0fb97ca2088d35d5efd69 [file] [log] [blame]
Larry Finger364e30e2014-03-28 21:37:41 -05001/******************************************************************************
2 *
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4 *
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.
8 *
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
12 * more details.
13 *
14 ******************************************************************************/
15#ifndef __USB_OPS_LINUX_H__
16#define __USB_OPS_LINUX_H__
17
18#define VENDOR_CMD_MAX_DATA_LEN 254
19
Larry Finger364e30e2014-03-28 21:37:41 -050020#define RTW_USB_CONTROL_MSG_TIMEOUT 500/* ms */
21
22#define MAX_USBCTRL_VENDORREQ_TIMES 10
23
Jes Sorensen68552a92014-05-16 10:05:10 +020024int rtl8723au_read_port(struct rtw_adapter *adapter, u32 addr, u32 cnt,
25 struct recv_buf *precvbuf);
26void rtl8723au_read_port_cancel(struct rtw_adapter *padapter);
27int rtl8723au_write_port(struct rtw_adapter *padapter, u32 addr, u32 cnt,
28 struct xmit_buf *pxmitbuf);
29void rtl8723au_write_port_cancel(struct rtw_adapter *padapter);
30int rtl8723au_read_interrupt(struct rtw_adapter *adapter, u32 addr);
Larry Finger364e30e2014-03-28 21:37:41 -050031
Jes Sorensen2786faa2014-07-01 12:07:00 +020032u8 rtl8723au_read8(struct rtw_adapter *padapter, u16 addr);
33u16 rtl8723au_read16(struct rtw_adapter *padapter, u16 addr);
34u32 rtl8723au_read32(struct rtw_adapter *padapter, u16 addr);
35int rtl8723au_write8(struct rtw_adapter *padapter, u16 addr, u8 val);
36int rtl8723au_write16(struct rtw_adapter *padapter, u16 addr, u16 val);
37int rtl8723au_write32(struct rtw_adapter *padapter, u16 addr, u32 val);
Jes Sorensenedbfd672014-05-16 10:05:09 +020038int rtl8723au_writeN(struct rtw_adapter *padapter,
Jes Sorensen2786faa2014-07-01 12:07:00 +020039 u16 addr, u16 length, u8 *pdata);
Jes Sorensen050abc42014-05-16 10:05:08 +020040
Larry Finger364e30e2014-03-28 21:37:41 -050041#endif