Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28842
b: refs/heads/master
c: aa95abe
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Jun 23, 2006
1 parent 0204672 commit de760e5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 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: c7985051dec26dc5ae2562a975a0b37b70621f3f
refs/heads/master: aa95abefccc25efea5c8654bc3475e8161319b94
10 changes: 6 additions & 4 deletions trunk/drivers/net/8390.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,14 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
int send_length = skb->len, output_page;
unsigned long flags;
char buf[ETH_ZLEN];
char *data = skb->data;

if (skb->len < ETH_ZLEN) {
skb = skb_padto(skb, ETH_ZLEN);
if (skb == NULL)
return 0;
memset(buf, 0, ETH_ZLEN); /* more efficient than doing just the needed bits */
memcpy(buf, data, skb->len);
send_length = ETH_ZLEN;
data = buf;
}

/* Mask interrupts from the ethercard.
Expand Down Expand Up @@ -347,7 +349,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
* trigger the send later, upon receiving a Tx done interrupt.
*/

ei_block_output(dev, send_length, skb->data, output_page);
ei_block_output(dev, send_length, data, output_page);

if (! ei_local->txing)
{
Expand Down
14 changes: 8 additions & 6 deletions trunk/drivers/net/wireless/wavelan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2903,6 +2903,7 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev)
{
net_local *lp = (net_local *) dev->priv;
unsigned long flags;
char data[ETH_ZLEN];

#ifdef DEBUG_TX_TRACE
printk(KERN_DEBUG "%s: ->wavelan_packet_xmit(0x%X)\n", dev->name,
Expand Down Expand Up @@ -2937,15 +2938,16 @@ static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev)
* able to detect collisions, therefore in theory we don't really
* need to pad. Jean II */
if (skb->len < ETH_ZLEN) {
skb = skb_padto(skb, ETH_ZLEN);
if (skb == NULL)
return 0;
memset(data, 0, ETH_ZLEN);
memcpy(data, skb->data, skb->len);
/* Write packet on the card */
if(wv_packet_write(dev, data, ETH_ZLEN))
return 1; /* We failed */
}

/* Write packet on the card */
if(wv_packet_write(dev, skb->data, skb->len))
else if(wv_packet_write(dev, skb->data, skb->len))
return 1; /* We failed */


dev_kfree_skb(skb);

#ifdef DEBUG_TX_TRACE
Expand Down

0 comments on commit de760e5

Please sign in to comment.