mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: Remove CONFIG_USB_SUPPORT_ASYNC_VDN_REQ - not defined
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
dcefeda1ca
commit
8c2ab2a5c5
4 changed files with 0 additions and 158 deletions
|
@ -2151,17 +2151,6 @@ static void ReadAdapterInfo8188EU(PADAPTER Adapter)
|
|||
#define GPIO_DEBUG_PORT_NUM 0
|
||||
static void rtl8192cu_trigger_gpio_0(_adapter *padapter)
|
||||
{
|
||||
#ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
|
||||
u32 gpioctrl;
|
||||
DBG_88E("==> trigger_gpio_0...\n");
|
||||
rtw_write16_async(padapter,REG_GPIO_PIN_CTRL,0);
|
||||
rtw_write8_async(padapter,REG_GPIO_PIN_CTRL+2,0xFF);
|
||||
gpioctrl = (BIT(GPIO_DEBUG_PORT_NUM)<<24 )|(BIT(GPIO_DEBUG_PORT_NUM)<<16);
|
||||
rtw_write32_async(padapter,REG_GPIO_PIN_CTRL,gpioctrl);
|
||||
gpioctrl |= (BIT(GPIO_DEBUG_PORT_NUM)<<8);
|
||||
rtw_write32_async(padapter,REG_GPIO_PIN_CTRL,gpioctrl);
|
||||
DBG_88E("<=== trigger_gpio_0...\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
static void ResumeTxBeacon(_adapter *padapter)
|
||||
|
|
|
@ -955,11 +955,6 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops)
|
|||
pops->_write32 = &usb_write32;
|
||||
pops->_writeN = &usb_writeN;
|
||||
|
||||
#ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
|
||||
pops->_write8_async= &usb_async_write8;
|
||||
pops->_write16_async = &usb_async_write16;
|
||||
pops->_write32_async = &usb_async_write32;
|
||||
#endif
|
||||
pops->_write_mem = &usb_write_mem;
|
||||
pops->_write_port = &usb_write_port;
|
||||
|
||||
|
|
|
@ -43,12 +43,6 @@
|
|||
#define usb_read_interrupt_complete(purb, regs) usb_read_interrupt_complete(purb)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
|
||||
int usb_async_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||
int usb_async_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
int usb_async_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
#endif /* CONFIG_USB_SUPPORT_ASYNC_VDN_REQ */
|
||||
|
||||
unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr);
|
||||
|
||||
void usb_read_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
|
||||
|
|
|
@ -22,142 +22,6 @@
|
|||
#include <usb_ops_linux.h>
|
||||
#include <rtw_sreset.h>
|
||||
|
||||
#ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
|
||||
static void _usbctrl_vendorreq_async_callback(struct urb *urb, struct pt_regs *regs)
|
||||
{
|
||||
if (urb) {
|
||||
if (urb->context) {
|
||||
kfree(urb->context);
|
||||
}
|
||||
usb_free_urb(urb);
|
||||
}
|
||||
}
|
||||
|
||||
static int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request,
|
||||
u16 value, u16 index, void *pdata, u16 len, u8 requesttype)
|
||||
{
|
||||
int rc;
|
||||
unsigned int pipe;
|
||||
u8 reqtype;
|
||||
struct usb_ctrlrequest *dr;
|
||||
struct urb *urb;
|
||||
struct rtl819x_async_write_data {
|
||||
u8 data[VENDOR_CMD_MAX_DATA_LEN];
|
||||
struct usb_ctrlrequest dr;
|
||||
} *buf;
|
||||
|
||||
|
||||
if (requesttype == VENDOR_READ) {
|
||||
pipe = usb_rcvctrlpipe(udev, 0);//read_in
|
||||
reqtype = REALTEK_USB_VENQT_READ;
|
||||
}
|
||||
else {
|
||||
pipe = usb_sndctrlpipe(udev, 0);//write_out
|
||||
reqtype = REALTEK_USB_VENQT_WRITE;
|
||||
}
|
||||
|
||||
buf = (struct rtl819x_async_write_data *)rtw_zmalloc(sizeof(*buf));
|
||||
if (!buf) {
|
||||
rc = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
urb = usb_alloc_urb(0, GFP_ATOMIC);
|
||||
if (!urb) {
|
||||
rtw_mfree((u8*)buf, sizeof(*buf));
|
||||
rc = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
dr = &buf->dr;
|
||||
|
||||
dr->bRequestType = reqtype;
|
||||
dr->bRequest = request;
|
||||
dr->wValue = cpu_to_le16(value);
|
||||
dr->wIndex = cpu_to_le16(index);
|
||||
dr->wLength = cpu_to_le16(len);
|
||||
|
||||
_rtw_memcpy(buf, pdata, len);
|
||||
|
||||
usb_fill_control_urb(urb, udev, pipe, (unsigned char *)dr, buf, len,
|
||||
_usbctrl_vendorreq_async_callback, buf);
|
||||
|
||||
rc = usb_submit_urb(urb, GFP_ATOMIC);
|
||||
if (rc < 0) {
|
||||
rtw_mfree((u8*)buf, sizeof(*buf));
|
||||
usb_free_urb(urb);
|
||||
}
|
||||
|
||||
exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
int usb_write_async(struct usb_device *udev, u32 addr, void *pdata, u16 len)
|
||||
{
|
||||
u8 request;
|
||||
u8 requesttype;
|
||||
u16 wvalue;
|
||||
u16 index;
|
||||
|
||||
int ret;
|
||||
|
||||
requesttype = VENDOR_WRITE;//write_out
|
||||
request = REALTEK_USB_VENQT_CMD_REQ;
|
||||
index = REALTEK_USB_VENQT_CMD_IDX;//n/a
|
||||
|
||||
wvalue = (u16)(addr&0x0000ffff);
|
||||
|
||||
ret = _usbctrl_vendorreq_async_write(udev, request, wvalue, index, pdata, len, requesttype);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int usb_async_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
|
||||
{
|
||||
u8 data;
|
||||
int ret;
|
||||
struct dvobj_priv *pdvobjpriv = (struct dvobj_priv *)pintfhdl->pintf_dev;
|
||||
struct usb_device *udev=pdvobjpriv->pusbdev;
|
||||
|
||||
_func_enter_;
|
||||
data = val;
|
||||
ret = usb_write_async(udev, addr, &data, 1);
|
||||
_func_exit_;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int usb_async_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
|
||||
{
|
||||
u16 data;
|
||||
int ret;
|
||||
struct dvobj_priv *pdvobjpriv = (struct dvobj_priv *)pintfhdl->pintf_dev;
|
||||
struct usb_device *udev=pdvobjpriv->pusbdev;
|
||||
|
||||
_func_enter_;
|
||||
data = val;
|
||||
ret = usb_write_async(udev, addr, &data, 2);
|
||||
_func_exit_;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int usb_async_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
|
||||
{
|
||||
u32 data;
|
||||
int ret;
|
||||
struct dvobj_priv *pdvobjpriv = (struct dvobj_priv *)pintfhdl->pintf_dev;
|
||||
struct usb_device *udev=pdvobjpriv->pusbdev;
|
||||
|
||||
_func_enter_;
|
||||
data = val;
|
||||
ret = usb_write_async(udev, addr, &data, 4);
|
||||
_func_exit_;
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_USB_SUPPORT_ASYNC_VDN_REQ */
|
||||
|
||||
unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr)
|
||||
{
|
||||
unsigned int pipe=0, ep_num=0;
|
||||
|
|
Loading…
Reference in a new issue