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 ******************************************************************************/
20 #ifndef __USB_OPS_LINUX_H__
21 #define __USB_OPS_LINUX_H__
23 #define VENDOR_CMD_MAX_DATA_LEN 254
25 #define RTW_USB_CONTROL_MSG_TIMEOUT_TEST 10/* ms */
26 #define RTW_USB_CONTROL_MSG_TIMEOUT 500/* ms */
28 #define MAX_USBCTRL_VENDORREQ_TIMES 10
30 #define RTW_USB_BULKOUT_TIME 5000/* ms */
32 #define _usbctrl_vendorreq_async_callback(urb, regs) \
33 _usbctrl_vendorreq_async_callback(urb)
34 #define usb_bulkout_zero_complete(purb, regs) \
35 usb_bulkout_zero_complete(purb)
36 #define usb_write_mem_complete(purb, regs) \
37 usb_write_mem_complete(purb)
38 #define usb_write_port_complete(purb, regs) \
39 usb_write_port_complete(purb)
40 #define usb_read_port_complete(purb, regs) \
41 usb_read_port_complete(purb)
42 #define usb_read_interrupt_complete(purb, regs) \
43 usb_read_interrupt_complete(purb)
45 unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr);
47 void usb_read_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
48 void usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
50 void usb_read_port_cancel(struct intf_hdl *pintfhdl);
52 u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
53 void usb_write_port_cancel(struct intf_hdl *pintfhdl);