mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-07 05:53:06 +00:00
rtl8188eu: Remove dead code for other than USB
The vendor code has pieces of code for PCI, SDIO, and GSPI. Remove it and CONFIG_USB_HCI. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
c5e461c221
commit
0e4009c999
46 changed files with 78 additions and 1448 deletions
|
@ -98,15 +98,10 @@ _func_enter_;
|
|||
precvframe++;
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
precvpriv->rx_pending_cnt=1;
|
||||
|
||||
_rtw_init_sema(&precvpriv->allrxreturnevt, 0);
|
||||
|
||||
#endif
|
||||
|
||||
res = rtw_hal_init_recv_priv(padapter);
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
@ -387,22 +382,13 @@ sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue)
|
|||
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue)
|
||||
{
|
||||
_irqL irqL;
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
|
||||
rtw_list_insert_tail(&precvbuf->list, get_list_head(queue));
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_exit_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
return _SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
||||
|
@ -411,11 +397,7 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
|||
struct recv_buf *precvbuf;
|
||||
_list *plist, *phead;
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
|
||||
if (_rtw_queue_empty(queue) == true)
|
||||
{
|
||||
|
@ -433,11 +415,7 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
|||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_exit_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
|
||||
return precvbuf;
|
||||
|
||||
|
@ -2293,65 +2271,8 @@ _func_exit_;
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
static void recvframe_expand_pkt(
|
||||
PADAPTER padapter,
|
||||
union recv_frame *prframe)
|
||||
{
|
||||
struct recv_frame_hdr *pfhdr;
|
||||
_pkt *ppkt;
|
||||
u8 shift_sz;
|
||||
u32 alloc_sz;
|
||||
|
||||
|
||||
pfhdr = &prframe->u.hdr;
|
||||
|
||||
/* 6 is for IP header 8 bytes alignment in QoS packet case. */
|
||||
if (pfhdr->attrib.qos)
|
||||
shift_sz = 6;
|
||||
else
|
||||
shift_sz = 0;
|
||||
|
||||
/* for first fragment packet, need to allocate */
|
||||
/* (1536 + RXDESC_SIZE + drvinfo_sz) to reassemble packet */
|
||||
/* 8 is for skb->data 8 bytes alignment. */
|
||||
/* alloc_sz = _RND(1536 + RXDESC_SIZE + pfhdr->attrib.drvinfosize + shift_sz + 8, 128); */
|
||||
alloc_sz = 1664; /* round (1536 + 24 + 32 + shift_sz + 8) to 128 bytes alignment */
|
||||
|
||||
/* 3 1. alloc new skb */
|
||||
/* prepare extra space for 4 bytes alignment */
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) /* www.mail-archive.com/netdev@vger.kernel.org/msg17214.html */
|
||||
ppkt = dev_alloc_skb(alloc_sz);
|
||||
if (ppkt) ppkt->dev = padapter->pnetdev;
|
||||
#else
|
||||
ppkt = netdev_alloc_skb(padapter->pnetdev, alloc_sz);
|
||||
#endif
|
||||
if (!ppkt) return; /* no way to expand */
|
||||
|
||||
/* 3 2. Prepare new skb to replace & release old skb */
|
||||
/* force ppkt->data at 8-byte alignment address */
|
||||
skb_reserve(ppkt, 8 - ((SIZE_PTR)ppkt->data & 7));
|
||||
/* force ip_hdr at 8-byte alignment address according to shift_sz */
|
||||
skb_reserve(ppkt, shift_sz);
|
||||
|
||||
/* copy data to new pkt */
|
||||
_rtw_memcpy(skb_put(ppkt, pfhdr->len), pfhdr->rx_data, pfhdr->len);
|
||||
|
||||
dev_kfree_skb_any(pfhdr->pkt);
|
||||
|
||||
/* attach new pkt to recvframe */
|
||||
pfhdr->pkt = ppkt;
|
||||
pfhdr->rx_head = ppkt->head;
|
||||
pfhdr->rx_data = ppkt->data;
|
||||
pfhdr->rx_tail = skb_tail_pointer(ppkt);
|
||||
pfhdr->rx_end = skb_end_pointer(ppkt);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* perform defrag */
|
||||
union recv_frame * recvframe_defrag(_adapter *adapter,_queue *defrag_q);
|
||||
union recv_frame * recvframe_defrag(_adapter *adapter,_queue *defrag_q)
|
||||
union recv_frame *recvframe_defrag(_adapter *adapter, _queue *defrag_q)
|
||||
{
|
||||
_list *plist, *phead;
|
||||
u8 wlanhdr_offset;
|
||||
|
@ -2381,12 +2302,6 @@ _func_enter_;
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
#ifndef CONFIG_SDIO_RX_COPY
|
||||
recvframe_expand_pkt(adapter, prframe);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
curfragnum++;
|
||||
|
||||
plist= get_list_head(defrag_q);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue