summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAndy Cress <andycress@gmail.com>2012-07-26 06:01:17 +0000
committerDavid S. Miller <davem@davemloft.net>2012-07-26 14:30:23 -0700
commit4487e64de63b8e42efe5a5543871c42c5a5859d9 (patch)
tree7acaa761ef550ba879816ea05eb531c6b70099d1 /drivers/net
parentf2c31662762b9e82b9891d6b385b17f9e5ef0ed2 (diff)
downloadlinux-3.10-4487e64de63b8e42efe5a5543871c42c5a5859d9.tar.gz
linux-3.10-4487e64de63b8e42efe5a5543871c42c5a5859d9.tar.bz2
linux-3.10-4487e64de63b8e42efe5a5543871c42c5a5859d9.zip
pch_gbe: vlan skb len fix
pch_gbe_xmit_frame skb->len verification was incorrect in vlan case causing bogus transfer length errors. One correction could be: offset = skb->protocol == htons(ETH_P_8021Q) ? 0 : 4; if (unlikely(skb->len > (adapter->hw.mac.max_frame_size - offset))) However, this verification is not necessary, so remove it. Signed-off-by: Andy Cress <andy.cress@us.kontron.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 1bb4cd14b14..feb85d56c75 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -2159,13 +2159,6 @@ static int pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
struct pch_gbe_tx_ring *tx_ring = adapter->tx_ring;
unsigned long flags;
- if (unlikely(skb->len > (adapter->hw.mac.max_frame_size - 4))) {
- pr_err("Transfer length Error: skb len: %d > max: %d\n",
- skb->len, adapter->hw.mac.max_frame_size);
- dev_kfree_skb_any(skb);
- adapter->stats.tx_length_errors++;
- return NETDEV_TX_OK;
- }
if (!spin_trylock_irqsave(&tx_ring->tx_lock, flags)) {
/* Collision - tell upper layer to requeue */
return NETDEV_TX_LOCKED;