qlge: Drop inbound frames > MTU.
authorRon Mercer <ron.mercer@qlogic.com>
Tue, 9 Jun 2009 05:39:28 +0000 (05:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Jun 2009 08:04:12 +0000 (01:04 -0700)
The max frame size register is set higher than the MTU to
accomodate FCoE frames.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlge/qlge_main.c

index 0775b4d7d3ff3eb4371bc0127d7ffd0c95c9c1e1..738691ddcc042da8823e8abf0409507d90564cd7 100644 (file)
@@ -1532,6 +1532,15 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev,
                dev_kfree_skb_any(skb);
                return;
        }
+
+       /* The max framesize filter on this chip is set higher than
+        * MTU since FCoE uses 2k frames.
+        */
+       if (skb->len > ndev->mtu + ETH_HLEN) {
+               dev_kfree_skb_any(skb);
+               return;
+       }
+
        prefetch(skb->data);
        skb->dev = ndev;
        if (ib_mac_rsp->flags1 & IB_MAC_IOCB_RSP_M_MASK) {