Larry Finger | 364e30e | 2014-03-28 21:37:41 -0500 | [diff] [blame] | 1 | /****************************************************************************** |
| 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 Finger | 364e30e | 2014-03-28 21:37:41 -0500 | [diff] [blame] | 20 | #define RTW_USB_CONTROL_MSG_TIMEOUT 500/* ms */ |
| 21 | |
| 22 | #define MAX_USBCTRL_VENDORREQ_TIMES 10 |
| 23 | |
Jes Sorensen | 68552a9 | 2014-05-16 10:05:10 +0200 | [diff] [blame] | 24 | int rtl8723au_read_port(struct rtw_adapter *adapter, u32 addr, u32 cnt, |
| 25 | struct recv_buf *precvbuf); |
| 26 | void rtl8723au_read_port_cancel(struct rtw_adapter *padapter); |
| 27 | int rtl8723au_write_port(struct rtw_adapter *padapter, u32 addr, u32 cnt, |
| 28 | struct xmit_buf *pxmitbuf); |
| 29 | void rtl8723au_write_port_cancel(struct rtw_adapter *padapter); |
| 30 | int rtl8723au_read_interrupt(struct rtw_adapter *adapter, u32 addr); |
Larry Finger | 364e30e | 2014-03-28 21:37:41 -0500 | [diff] [blame] | 31 | |
Jes Sorensen | 2786faa | 2014-07-01 12:07:00 +0200 | [diff] [blame^] | 32 | u8 rtl8723au_read8(struct rtw_adapter *padapter, u16 addr); |
| 33 | u16 rtl8723au_read16(struct rtw_adapter *padapter, u16 addr); |
| 34 | u32 rtl8723au_read32(struct rtw_adapter *padapter, u16 addr); |
| 35 | int rtl8723au_write8(struct rtw_adapter *padapter, u16 addr, u8 val); |
| 36 | int rtl8723au_write16(struct rtw_adapter *padapter, u16 addr, u16 val); |
| 37 | int rtl8723au_write32(struct rtw_adapter *padapter, u16 addr, u32 val); |
Jes Sorensen | edbfd67 | 2014-05-16 10:05:09 +0200 | [diff] [blame] | 38 | int rtl8723au_writeN(struct rtw_adapter *padapter, |
Jes Sorensen | 2786faa | 2014-07-01 12:07:00 +0200 | [diff] [blame^] | 39 | u16 addr, u16 length, u8 *pdata); |
Jes Sorensen | 050abc4 | 2014-05-16 10:05:08 +0200 | [diff] [blame] | 40 | |
Larry Finger | 364e30e | 2014-03-28 21:37:41 -0500 | [diff] [blame] | 41 | #endif |