mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 22:43:04 +00:00
rtl8188eu: Place driver rtl8188EUS_rtl8189ES_linux_v4.1.8_9499.20131104 in branch v4.1.8_9499
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
bad0b4cde4
commit
065126d8ce
247 changed files with 192113 additions and 30447 deletions
134
include/usb_ops.h
Normal file → Executable file
134
include/usb_ops.h
Normal file → Executable file
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
|
@ -20,7 +20,7 @@
|
|||
#ifndef __USB_OPS_H_
|
||||
#define __USB_OPS_H_
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <osdep_intf.h>
|
||||
|
@ -30,86 +30,94 @@
|
|||
#define REALTEK_USB_VENQT_CMD_REQ 0x05
|
||||
#define REALTEK_USB_VENQT_CMD_IDX 0x00
|
||||
|
||||
enum {
|
||||
enum{
|
||||
VENDOR_WRITE = 0x00,
|
||||
VENDOR_READ = 0x01,
|
||||
};
|
||||
#define ALIGNMENT_UNIT 16
|
||||
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
||||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
|
||||
#define ALIGNMENT_UNIT 16
|
||||
#define MAX_VENDOR_REQ_CMD_SIZE 254 //8188cu SIE Support
|
||||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE +ALIGNMENT_UNIT)
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12))
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
||||
value, index, data, size, timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value),\
|
||||
(index), (data), (size), (timeout_ms))
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), (timeout_ms))
|
||||
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
|
||||
usb_bulk_msg((usb_dev), (pipe), (data), (len), \
|
||||
(actual_length), (timeout_ms))
|
||||
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), (timeout_ms))
|
||||
#else
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, \
|
||||
value, index, data, size, timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), \
|
||||
(value), (index), (data), (size), \
|
||||
((timeout_ms) == 0) || \
|
||||
((timeout_ms)*HZ/1000 > 0) ? \
|
||||
((timeout_ms)*HZ/1000) : 1)
|
||||
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, \
|
||||
actual_length, timeout_ms) \
|
||||
#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size,timeout_ms) \
|
||||
usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), \
|
||||
((timeout_ms) == 0) ||((timeout_ms)*HZ/1000>0)?((timeout_ms)*HZ/1000):1)
|
||||
#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
|
||||
usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), \
|
||||
((timeout_ms) == 0) || ((timeout_ms)*HZ/1000 > 0) ?\
|
||||
((timeout_ms)*HZ/1000) : 1)
|
||||
((timeout_ms) == 0) ||((timeout_ms)*HZ/1000>0)?((timeout_ms)*HZ/1000):1)
|
||||
#endif
|
||||
#include <usb_ops_linux.h>
|
||||
#endif //PLATFORM_LINUX
|
||||
|
||||
void rtl8188eu_set_hw_type(struct adapter *padapter);
|
||||
#ifdef CONFIG_RTL8192C
|
||||
void rtl8192cu_set_hw_type(_adapter *padapter);
|
||||
#define hal_set_hw_type rtl8192cu_set_hw_type
|
||||
|
||||
void rtl8192cu_set_intf_ops(struct _io_ops *pops);
|
||||
#define usb_set_intf_ops rtl8192cu_set_intf_ops
|
||||
|
||||
void rtl8192cu_recv_tasklet(void *priv);
|
||||
|
||||
void rtl8192cu_xmit_tasklet(void *priv);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8723A
|
||||
void rtl8723au_set_hw_type(_adapter *padapter);
|
||||
#define hal_set_hw_type rtl8723au_set_hw_type
|
||||
|
||||
void rtl8723au_set_intf_ops(struct _io_ops *pops);
|
||||
#define usb_set_intf_ops rtl8723au_set_intf_ops
|
||||
|
||||
void rtl8192cu_recv_tasklet(void *priv);
|
||||
|
||||
void rtl8192cu_xmit_tasklet(void *priv);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8192D
|
||||
void rtl8192du_set_hw_type(_adapter *padapter);
|
||||
#define hal_set_hw_type rtl8192du_set_hw_type
|
||||
void rtl8192du_set_intf_ops(struct _io_ops *pops);
|
||||
#define usb_set_intf_ops rtl8192du_set_intf_ops
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
void rtl8192du_recv_tasklet(void *priv);
|
||||
#else // PLATFORM_FREEBSD
|
||||
void rtl8192du_recv_tasklet(void *priv, int npending);
|
||||
#ifdef CONFIG_RX_INDICATE_QUEUE
|
||||
void rtw_rx_indicate_tasklet(void *priv, int npending);
|
||||
#endif // CONFIG_RX_INDICATE_QUEUE
|
||||
#endif // PLATFORM_FREEBSD
|
||||
|
||||
void rtl8192du_xmit_tasklet(void *priv);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8188E
|
||||
void rtl8188eu_set_hw_type(_adapter *padapter);
|
||||
#define hal_set_hw_type rtl8188eu_set_hw_type
|
||||
void rtl8188eu_set_intf_ops(struct _io_ops *pops);
|
||||
#define usb_set_intf_ops rtl8188eu_set_intf_ops
|
||||
|
||||
/*
|
||||
* Increase and check if the continual_urb_error of this @param dvobjprivei
|
||||
* is larger than MAX_CONTINUAL_URB_ERR
|
||||
* @return true:
|
||||
* @return false:
|
||||
*/
|
||||
static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
|
||||
{
|
||||
int ret = false;
|
||||
int value;
|
||||
value = ATOMIC_INC_RETURN(&dvobj->continual_urb_error);
|
||||
if (value > MAX_CONTINUAL_URB_ERR) {
|
||||
DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n",
|
||||
dvobj, value, MAX_CONTINUAL_URB_ERR);
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the continual_urb_error of this @param dvobjprive to 0
|
||||
*/
|
||||
static inline void rtw_reset_continual_urb_error(struct dvobj_priv *dvobj)
|
||||
{
|
||||
ATOMIC_SET(&dvobj->continual_urb_error, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define USB_HIGH_SPEED_BULK_SIZE 512
|
||||
#define USB_FULL_SPEED_BULK_SIZE 64
|
||||
|
||||
static inline u8 rtw_usb_bulk_size_boundary(struct adapter *padapter,
|
||||
int buf_len)
|
||||
static inline u8 rtw_usb_bulk_size_boundary(_adapter * padapter,int buf_len)
|
||||
{
|
||||
u8 rst = true;
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
u8 rst = _TRUE;
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
|
||||
if (pdvobjpriv->ishighspeed)
|
||||
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ?
|
||||
true : false;
|
||||
else
|
||||
rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ?
|
||||
true : false;
|
||||
if (pdvobjpriv->ishighspeed == _TRUE)
|
||||
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE)?_TRUE:_FALSE;
|
||||
else
|
||||
rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE)?_TRUE:_FALSE;
|
||||
return rst;
|
||||
}
|
||||
|
||||
#endif /* __USB_OPS_H_ */
|
||||
|
||||
#endif //__USB_OPS_H_
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue