linux/drivers/staging/rtl8188eu/include/usb_ops_linux.h
<<
>>
Prefs
   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_TEST        10/* ms */
  21#define RTW_USB_CONTROL_MSG_TIMEOUT     500/* ms */
  22
  23#define MAX_USBCTRL_VENDORREQ_TIMES     10
  24
  25#define RTW_USB_BULKOUT_TIME    5000/* ms */
  26
  27#define REALTEK_USB_VENQT_READ          0xC0
  28#define REALTEK_USB_VENQT_WRITE         0x40
  29
  30#define ALIGNMENT_UNIT                  16
  31#define MAX_VENDOR_REQ_CMD_SIZE 254     /* 8188cu SIE Support */
  32#define MAX_USB_IO_CTL_SIZE     (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
  33
  34#define USB_HIGH_SPEED_BULK_SIZE        512
  35#define USB_FULL_SPEED_BULK_SIZE        64
  36
  37#define _usbctrl_vendorreq_async_callback(urb, regs)    \
  38        _usbctrl_vendorreq_async_callback(urb)
  39#define usb_bulkout_zero_complete(purb, regs)           \
  40        usb_bulkout_zero_complete(purb)
  41#define usb_write_mem_complete(purb, regs)              \
  42        usb_write_mem_complete(purb)
  43#define usb_write_port_complete(purb, regs)             \
  44        usb_write_port_complete(purb)
  45#define usb_read_port_complete(purb, regs)              \
  46        usb_read_port_complete(purb)
  47#define usb_read_interrupt_complete(purb, regs)         \
  48        usb_read_interrupt_complete(purb)
  49
  50unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr);
  51
  52u8 usb_read8(struct adapter *adapter, u32 addr);
  53u16 usb_read16(struct adapter *adapter, u32 addr);
  54u32 usb_read32(struct adapter *adapter, u32 addr);
  55
  56u32 usb_read_port(struct adapter *adapter, u32 addr, struct recv_buf *precvbuf);
  57void usb_read_port_cancel(struct adapter *adapter);
  58
  59int usb_write8(struct adapter *adapter, u32 addr, u8 val);
  60int usb_write16(struct adapter *adapter, u32 addr, u16 val);
  61int usb_write32(struct adapter *adapter, u32 addr, u32 val);
  62
  63u32 usb_write_port(struct adapter *adapter, u32 addr, u32 cnt, struct xmit_buf *pmem);
  64void usb_write_port_cancel(struct adapter *adapter);
  65
  66#endif
  67