Commit c20c900b authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix ray_cs using skb_padto

parent b4850fc1
...@@ -1052,7 +1052,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1052,7 +1052,7 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
ray_dev_t *local = dev->priv; ray_dev_t *local = dev->priv;
dev_link_t *link = local->finder; dev_link_t *link = local->finder;
short length; short length = skb->len;
if (!(link->state & DEV_PRESENT)) { if (!(link->state & DEV_PRESENT)) {
DEBUG(2,"ray_dev_start_xmit - device not present\n"); DEBUG(2,"ray_dev_start_xmit - device not present\n");
...@@ -1068,7 +1068,13 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1068,7 +1068,13 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
} }
} }
length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; if (length < ETH_ZLEN)
{
skb = skb_padto(skb, ETH_ZLEN);
if (skb == NULL)
return 0;
length = ETH_ZLEN;
}
switch (ray_hw_xmit( skb->data, length, dev, DATA_TYPE)) { switch (ray_hw_xmit( skb->data, length, dev, DATA_TYPE)) {
case XMIT_NO_CCS: case XMIT_NO_CCS:
case XMIT_NEED_AUTH: case XMIT_NEED_AUTH:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment