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 20#define RTW_USB_CONTROL_MSG_TIMEOUT 500/* ms */ 21 22#define MAX_USBCTRL_VENDORREQ_TIMES 10 23 24int 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); 31 32u8 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); 38int rtl8723au_writeN(struct rtw_adapter *padapter, 39 u16 addr, u16 length, u8 *pdata); 40 41#endif 42