rtl8188eu: Remove CONFIG_PREALLOC_RECV_SKB

This symbol is always defined.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-02-27 20:17:55 -06:00
parent d264b3ae00
commit 51e00090df
3 changed files with 1 additions and 34 deletions

View file

@ -123,7 +123,6 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
skb_queue_head_init(&precvpriv->rx_skb_queue); skb_queue_head_init(&precvpriv->rx_skb_queue);
#ifdef CONFIG_PREALLOC_RECV_SKB
{ {
int i; int i;
SIZE_PTR tmpaddr=0; SIZE_PTR tmpaddr=0;
@ -151,10 +150,8 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
} }
} }
#endif
exit: exit:
return res; return res;
} }
@ -189,14 +186,9 @@ void rtl8188eu_free_recv_priv (struct adapter *padapter)
rtw_skb_queue_purge(&precvpriv->rx_skb_queue); rtw_skb_queue_purge(&precvpriv->rx_skb_queue);
#ifdef CONFIG_PREALLOC_RECV_SKB
if (skb_queue_len(&precvpriv->free_recv_skb_queue)) { if (skb_queue_len(&precvpriv->free_recv_skb_queue)) {
DBG_8192C(KERN_WARNING "free_recv_skb_queue not empty, %d\n", skb_queue_len(&precvpriv->free_recv_skb_queue)); DBG_8192C(KERN_WARNING "free_recv_skb_queue not empty, %d\n", skb_queue_len(&precvpriv->free_recv_skb_queue));
} }
rtw_skb_queue_purge(&precvpriv->free_recv_skb_queue); rtw_skb_queue_purge(&precvpriv->free_recv_skb_queue);
#endif
} }

View file

@ -669,18 +669,11 @@ void rtl8188eu_recv_tasklet(void *priv)
recvbuf2recvframe(padapter, pskb); recvbuf2recvframe(padapter, pskb);
#ifdef CONFIG_PREALLOC_RECV_SKB
skb_reset_tail_pointer(pskb); skb_reset_tail_pointer(pskb);
pskb->len = 0; pskb->len = 0;
skb_queue_tail(&precvpriv->free_recv_skb_queue, pskb); skb_queue_tail(&precvpriv->free_recv_skb_queue, pskb);
#else
rtw_skb_free(pskb);
#endif
} }
} }
@ -713,14 +706,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
{ {
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped(%d) OR bSurpriseRemoved(%d)\n", padapter->bDriverStopped, padapter->bSurpriseRemoved)); RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped(%d) OR bSurpriseRemoved(%d)\n", padapter->bDriverStopped, padapter->bSurpriseRemoved));
#ifdef CONFIG_PREALLOC_RECV_SKB
precvbuf->reuse = true; precvbuf->reuse = true;
#else
if (precvbuf->pskb){
DBG_8192C("==> free skb(%p)\n",precvbuf->pskb);
rtw_skb_free(precvbuf->pskb);
}
#endif
DBG_8192C("%s() RX Warning! bDriverStopped(%d) OR bSurpriseRemoved(%d) bReadPortCancel(%d)\n", DBG_8192C("%s() RX Warning! bDriverStopped(%d) OR bSurpriseRemoved(%d) bReadPortCancel(%d)\n",
__FUNCTION__,padapter->bDriverStopped, padapter->bSurpriseRemoved,padapter->bReadPortCancel); __FUNCTION__,padapter->bDriverStopped, padapter->bSurpriseRemoved,padapter->bReadPortCancel);
goto exit; goto exit;
@ -825,15 +811,10 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
return _FAIL; return _FAIL;
} }
#ifdef CONFIG_PREALLOC_RECV_SKB if ((precvbuf->reuse == false) || (precvbuf->pskb == NULL)) {
if ((precvbuf->reuse == false) || (precvbuf->pskb == NULL))
{
if (NULL != (precvbuf->pskb = skb_dequeue(&precvpriv->free_recv_skb_queue))) if (NULL != (precvbuf->pskb = skb_dequeue(&precvpriv->free_recv_skb_queue)))
{
precvbuf->reuse = true; precvbuf->reuse = true;
}
} }
#endif
if (precvbuf != NULL) { if (precvbuf != NULL) {
rtl8188eu_init_recvbuf(adapter, precvbuf); rtl8188eu_init_recvbuf(adapter, precvbuf);

View file

@ -76,12 +76,6 @@
#define CONFIG_BR_EXT_BRNAME "br0" #define CONFIG_BR_EXT_BRNAME "br0"
#endif // CONFIG_BR_EXT #endif // CONFIG_BR_EXT
/*
* Interface Related Config
*/
#define CONFIG_PREALLOC_RECV_SKB
/* /*
* USB VENDOR REQ BUFFER ALLOCATION METHOD * USB VENDOR REQ BUFFER ALLOCATION METHOD
* if not set we'll use function local variable (stack memory) * if not set we'll use function local variable (stack memory)