myri10ge: fix the invokation of lro_flush_all
authorBrice Goglin <brice@myri.com>
Sun, 24 May 2009 05:27:41 +0000 (05:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 May 2009 07:35:53 +0000 (00:35 -0700)
Fix the way we check whether lro_flush_all should be called
in the myri10ge driver.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/myri10ge/myri10ge.c

index c9a9aca436758c8584b4ee957fcfced3e98e10f9..d317011aa56abb89aefdf87f4ec48bee82745437 100644 (file)
@@ -1422,6 +1422,7 @@ myri10ge_clean_rx_done(struct myri10ge_slice_state *ss, int budget)
 {
        struct myri10ge_rx_done *rx_done = &ss->rx_done;
        struct myri10ge_priv *mgp = ss->mgp;
+       struct net_device *netdev = mgp->dev;
        unsigned long rx_bytes = 0;
        unsigned long rx_packets = 0;
        unsigned long rx_ok;
@@ -1455,7 +1456,7 @@ myri10ge_clean_rx_done(struct myri10ge_slice_state *ss, int budget)
        ss->stats.rx_packets += rx_packets;
        ss->stats.rx_bytes += rx_bytes;
 
-       if (myri10ge_lro)
+       if (netdev->features & NETIF_F_LRO)
                lro_flush_all(&rx_done->lro_mgr);
 
        /* restock receive rings if needed */