aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2014-01-15 13:04:26 -0800
committerDavid S. Miller <davem@davemloft.net>2014-01-16 16:22:54 -0800
commit31cf344caf444ca7411d89c8ac907d886eeab1a7 (patch)
treec8cad9f43e4df16ff955b2d9b1da60f72965f219 /drivers
parentr6040: add delays in MDIO read/write polling loops (diff)
downloadlinux-dev-31cf344caf444ca7411d89c8ac907d886eeab1a7.tar.xz
linux-dev-31cf344caf444ca7411d89c8ac907d886eeab1a7.zip
r6040: use ETH_ZLEN instead of MISR for SKB length checking
Ever since this driver was merged the following code was included: if (skb->len < MISR) skb->len = MISR; MISR is defined to 0x3C which is also equivalent to ETH_ZLEN, but use ETH_ZLEN directly which is exactly what we want to be checking for. Reported-by: Marc Volovic <marcv@ezchip.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/rdc/r6040.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index c6cd1d05f8ea..819b74cefd64 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -835,8 +835,8 @@ static netdev_tx_t r6040_start_xmit(struct sk_buff *skb,
/* Set TX descriptor & Transmit it */
lp->tx_free_desc--;
descptr = lp->tx_insert_ptr;
- if (skb->len < MISR)
- descptr->len = MISR;
+ if (skb->len < ETH_ZLEN)
+ descptr->len = ETH_ZLEN;
else
descptr->len = skb->len;