Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90865
b: refs/heads/master
c: 26a17b7
h: refs/heads/master
i:
  90863: 3716ca6
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Apr 17, 2008
1 parent aa7b9ef commit f6a1410
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 9c28eaea90aef8db20004d29f924ad3059d9704e
refs/heads/master: 26a17b7bbb36a8552d531bc1ad08472fb5aa3007
14 changes: 4 additions & 10 deletions trunk/drivers/net/sc92031.c
Original file line number Diff line number Diff line change
Expand Up @@ -947,24 +947,23 @@ static struct net_device_stats *sc92031_get_stats(struct net_device *dev)

static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
int err = 0;
struct sc92031_priv *priv = netdev_priv(dev);
void __iomem *port_base = priv->port_base;

unsigned len;
unsigned entry;
u32 tx_status;

if (skb_padto(skb, ETH_ZLEN))
return NETDEV_TX_OK;

if (unlikely(skb->len > TX_BUF_SIZE)) {
err = -EMSGSIZE;
dev->stats.tx_dropped++;
goto out;
}

spin_lock(&priv->lock);

if (unlikely(!netif_carrier_ok(dev))) {
err = -ENOLINK;
dev->stats.tx_dropped++;
goto out_unlock;
}
Expand All @@ -976,11 +975,6 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
skb_copy_and_csum_dev(skb, priv->tx_bufs + entry * TX_BUF_SIZE);

len = skb->len;
if (unlikely(len < ETH_ZLEN)) {
memset(priv->tx_bufs + entry * TX_BUF_SIZE + len,
0, ETH_ZLEN - len);
len = ETH_ZLEN;
}

wmb();

Expand All @@ -1007,7 +1001,7 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
out:
dev_kfree_skb(skb);

return err;
return NETDEV_TX_OK;
}

static int sc92031_open(struct net_device *dev)
Expand Down

0 comments on commit f6a1410

Please sign in to comment.