summaryrefslogtreecommitdiff
path: root/drivers/net/declance.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2003-01-10 04:14:01 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-01-10 04:14:01 -0800
commitaca71ead179a4e2188a5065259db24da1f0a40fb (patch)
tree4d795ef319cd551dd1305902107fa79b58a3dfbd /drivers/net/declance.c
parent1f1c31e07b2478eefc4e6e7af057cc8f028e42c1 (diff)
[PATCH] padto - fix declance using skb_padto
Diffstat (limited to 'drivers/net/declance.c')
-rw-r--r--drivers/net/declance.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/declance.c b/drivers/net/declance.c
index f78abc9baf29..98f558dd7f90 100644
--- a/drivers/net/declance.c
+++ b/drivers/net/declance.c
@@ -869,7 +869,14 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
skblen = skb->len;
- len = (skblen <= ETH_ZLEN) ? ETH_ZLEN : skblen;
+ len = skblen;
+
+ if (len < ETH_ZLEN) {
+ skb = skb_padto(skb, ETH_ZLEN);
+ if (skb == NULL)
+ return 0;
+ len = ETH_ZLEN;
+ }
lp->stats.tx_bytes += len;