mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 12:33:40 +00:00
rtl8188eu: Remove CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC - defined
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
72ff07da57
commit
e93cc6a163
4 changed files with 0 additions and 28 deletions
|
@ -61,21 +61,7 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
|
||||||
_enter_critical_mutex(&pdvobjpriv->usb_vendor_req_mutex, NULL);
|
_enter_critical_mutex(&pdvobjpriv->usb_vendor_req_mutex, NULL);
|
||||||
|
|
||||||
/* Acquire IO memory for vendorreq */
|
/* Acquire IO memory for vendorreq */
|
||||||
#ifdef CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC
|
|
||||||
pIo_buf = pdvobjpriv->usb_vendor_req_buf;
|
pIo_buf = pdvobjpriv->usb_vendor_req_buf;
|
||||||
#else
|
|
||||||
#ifdef CONFIG_USB_VENDOR_REQ_BUFFER_DYNAMIC_ALLOCATE
|
|
||||||
tmp_buf = rtw_malloc( (u32) len + ALIGNMENT_UNIT);
|
|
||||||
tmp_buflen = (u32)len + ALIGNMENT_UNIT;
|
|
||||||
#else /* use stack memory */
|
|
||||||
tmp_buflen = MAX_USB_IO_CTL_SIZE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Added by Albert 2010/02/09 */
|
|
||||||
/* For mstar platform, mstar suggests the address for USB IO should be 16 bytes alignment. */
|
|
||||||
/* Trying to fix it here. */
|
|
||||||
pIo_buf = (tmp_buf==NULL)?NULL:tmp_buf + ALIGNMENT_UNIT -((SIZE_PTR)(tmp_buf) & 0x0f );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( pIo_buf== NULL) {
|
if ( pIo_buf== NULL) {
|
||||||
DBG_88E( "[%s] pIo_buf == NULL\n", __func__ );
|
DBG_88E( "[%s] pIo_buf == NULL\n", __func__ );
|
||||||
|
|
|
@ -56,12 +56,6 @@
|
||||||
|
|
||||||
#define CONFIG_PREALLOC_RECV_SKB
|
#define CONFIG_PREALLOC_RECV_SKB
|
||||||
|
|
||||||
/*
|
|
||||||
* USB VENDOR REQ BUFFER ALLOCATION METHOD
|
|
||||||
* if not set we'll use function local variable (stack memory)
|
|
||||||
*/
|
|
||||||
#define CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC
|
|
||||||
|
|
||||||
#define CONFIG_VENDOR_REQ_RETRY
|
#define CONFIG_VENDOR_REQ_RETRY
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -207,10 +207,8 @@ struct dvobj_priv
|
||||||
_sema usb_suspend_sema;
|
_sema usb_suspend_sema;
|
||||||
_mutex usb_vendor_req_mutex;
|
_mutex usb_vendor_req_mutex;
|
||||||
|
|
||||||
#ifdef CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC
|
|
||||||
u8 * usb_alloc_vendor_req_buf;
|
u8 * usb_alloc_vendor_req_buf;
|
||||||
u8 * usb_vendor_req_buf;
|
u8 * usb_vendor_req_buf;
|
||||||
#endif
|
|
||||||
|
|
||||||
struct usb_interface *pusbintf;
|
struct usb_interface *pusbintf;
|
||||||
struct usb_device *pusbdev;
|
struct usb_device *pusbdev;
|
||||||
|
|
|
@ -201,7 +201,6 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
|
||||||
|
|
||||||
_rtw_mutex_init(&dvobj->usb_vendor_req_mutex);
|
_rtw_mutex_init(&dvobj->usb_vendor_req_mutex);
|
||||||
|
|
||||||
#ifdef CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC
|
|
||||||
dvobj->usb_alloc_vendor_req_buf = rtw_zmalloc(MAX_USB_IO_CTL_SIZE);
|
dvobj->usb_alloc_vendor_req_buf = rtw_zmalloc(MAX_USB_IO_CTL_SIZE);
|
||||||
if (dvobj->usb_alloc_vendor_req_buf == NULL) {
|
if (dvobj->usb_alloc_vendor_req_buf == NULL) {
|
||||||
DBG_88E("alloc usb_vendor_req_buf failed... /n");
|
DBG_88E("alloc usb_vendor_req_buf failed... /n");
|
||||||
|
@ -211,20 +210,15 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
|
||||||
dvobj->usb_vendor_req_buf =
|
dvobj->usb_vendor_req_buf =
|
||||||
(u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(dvobj->usb_alloc_vendor_req_buf ), ALIGNMENT_UNIT);
|
(u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(dvobj->usb_alloc_vendor_req_buf ), ALIGNMENT_UNIT);
|
||||||
exit:
|
exit:
|
||||||
#endif
|
|
||||||
|
|
||||||
return rst;
|
return rst;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
|
static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
|
||||||
{
|
{
|
||||||
u8 rst = _SUCCESS;
|
u8 rst = _SUCCESS;
|
||||||
|
|
||||||
#ifdef CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC
|
|
||||||
if (dvobj->usb_vendor_req_buf)
|
if (dvobj->usb_vendor_req_buf)
|
||||||
rtw_mfree(dvobj->usb_alloc_vendor_req_buf, MAX_USB_IO_CTL_SIZE);
|
rtw_mfree(dvobj->usb_alloc_vendor_req_buf, MAX_USB_IO_CTL_SIZE);
|
||||||
#endif
|
|
||||||
|
|
||||||
_rtw_mutex_free(&dvobj->usb_vendor_req_mutex);
|
_rtw_mutex_free(&dvobj->usb_vendor_req_mutex);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue