Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134779
b: refs/heads/master
c: f7b493e
h: refs/heads/master
i:
  134777: bbf8904
  134775: c42a1d6
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Feb 27, 2009
1 parent ccc0743 commit 8b8300b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6435f3a53746a0eb687a9f636cf1941f35f935e
refs/heads/master: f7b493e02101bb5a0a69a91a8b4b7b002cd60eaf
10 changes: 9 additions & 1 deletion trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -4339,6 +4339,13 @@ static int tg3_rx(struct tg3 *tp, int budget)
skb->ip_summed = CHECKSUM_NONE;

skb->protocol = eth_type_trans(skb, tp->dev);

if (len > (tp->dev->mtu + ETH_HLEN) &&
skb->protocol != htons(ETH_P_8021Q)) {
dev_kfree_skb(skb);
goto next_pkt;
}

#if TG3_VLAN_TAG_USED
if (tp->vlgrp != NULL &&
desc->type_flags & RXD_FLAG_VLAN) {
Expand Down Expand Up @@ -6824,7 +6831,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
__tg3_set_mac_addr(tp, 0);

/* MTU + ethernet header + FCS + optional VLAN tag */
tw32(MAC_RX_MTU_SIZE, tp->dev->mtu + ETH_HLEN + 8);
tw32(MAC_RX_MTU_SIZE,
tp->dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN);

/* The slot time is changed by tg3_setup_phy if we
* run at gigabit with half duplex.
Expand Down

0 comments on commit 8b8300b

Please sign in to comment.