gro: Check for GSO packets and packets with frag_list
[pandora-kernel.git] / net / core / dev.c
index 5f736f1..7dec715 100644 (file)
@@ -1087,6 +1087,11 @@ int dev_open(struct net_device *dev)
                 */
                dev->flags |= IFF_UP;
 
+               /*
+                *      Enable NET_DMA
+                */
+               dmaengine_get();
+
                /*
                 *      Initialize multicasting status
                 */
@@ -1164,6 +1169,11 @@ int dev_close(struct net_device *dev)
         */
        call_netdevice_notifiers(NETDEV_DOWN, dev);
 
+       /*
+        *      Shutdown NET_DMA
+        */
+       dmaengine_put();
+
        return 0;
 }
 
@@ -2382,6 +2392,9 @@ int dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
        if (!(skb->dev->features & NETIF_F_GRO))
                goto normal;
 
+       if (skb_is_gso(skb) || skb_shinfo(skb)->frag_list)
+               goto normal;
+
        rcu_read_lock();
        list_for_each_entry_rcu(ptype, head, list) {
                struct sk_buff *p;
@@ -5151,9 +5164,6 @@ static int __init net_dev_init(void)
        hotcpu_notifier(dev_cpu_callback, 0);
        dst_init();
        dev_mcast_init();
-       #ifdef CONFIG_NET_DMA
-       dmaengine_get();
-       #endif
        rc = 0;
 out:
        return rc;