aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index c7bbbb19f000..774a01ab03be 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -4339,6 +4339,13 @@ static int tg3_rx(struct tg3 *tp, int budget)
4339 skb->ip_summed = CHECKSUM_NONE; 4339 skb->ip_summed = CHECKSUM_NONE;
4340 4340
4341 skb->protocol = eth_type_trans(skb, tp->dev); 4341 skb->protocol = eth_type_trans(skb, tp->dev);
4342
4343 if (len > (tp->dev->mtu + ETH_HLEN) &&
4344 skb->protocol != htons(ETH_P_8021Q)) {
4345 dev_kfree_skb(skb);
4346 goto next_pkt;
4347 }
4348
4342#if TG3_VLAN_TAG_USED 4349#if TG3_VLAN_TAG_USED
4343 if (tp->vlgrp != NULL && 4350 if (tp->vlgrp != NULL &&
4344 desc->type_flags & RXD_FLAG_VLAN) { 4351 desc->type_flags & RXD_FLAG_VLAN) {
@@ -6824,7 +6831,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
6824 __tg3_set_mac_addr(tp, 0); 6831 __tg3_set_mac_addr(tp, 0);
6825 6832
6826 /* MTU + ethernet header + FCS + optional VLAN tag */ 6833 /* MTU + ethernet header + FCS + optional VLAN tag */
6827 tw32(MAC_RX_MTU_SIZE, tp->dev->mtu + ETH_HLEN + 8); 6834 tw32(MAC_RX_MTU_SIZE,
6835 tp->dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN);
6828 6836
6829 /* The slot time is changed by tg3_setup_phy if we 6837 /* The slot time is changed by tg3_setup_phy if we
6830 * run at gigabit with half duplex. 6838 * run at gigabit with half duplex.