OSDN Git Service

Remove duplicate copy of if_ether.h and use the kernel provided one
[android-x86/external-modules-rtl8723au.git] / core / rtw_recv.c
index 7e2d9d7..e578e5d 100644 (file)
 #include <recv_osdep.h>
 #include <mlme_osdep.h>
 #include <ip.h>
-#include <if_ether.h>
+#include <linux/if_ether.h>
 #include <ethernet.h>
-
-#ifdef CONFIG_USB_HCI
 #include <usb_ops.h>
-#endif
-
+#include <linux/ieee80211.h>
 #include <wifi.h>
 #include <circ_buf.h>
 
@@ -107,14 +104,10 @@ _func_enter_;
 
        }
 
-#ifdef CONFIG_USB_HCI
-
        precvpriv->rx_pending_cnt=1;
 
        sema_init(&precvpriv->allrxreturnevt, 0);
 
-#endif
-
        res = rtw_hal_init_recv_priv(padapter);
 
 #ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
@@ -2104,60 +2097,6 @@ _func_exit_;
        return ret;
 }
 
-#if 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)) /*  http: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 - ((unsigned long)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 */
-       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)
@@ -2190,12 +2129,6 @@ _func_enter_;
                return NULL;
        }
 
-#if defined(CONFIG_GSPI_HCI)
-#ifndef CONFIG_SDIO_RX_COPY
-       recvframe_expand_pkt(adapter, prframe);
-#endif
-#endif
-
        curfragnum++;
 
        plist= get_list_head(defrag_q);