diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 17:49:50 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 17:49:50 -0700 |
commit | b9099ff63c75216d6ca10bce5a1abcd9293c27e6 (patch) | |
tree | 244c167220a1921156cdf24eb19f663f25e9c517 /drivers/net | |
parent | 940155309cd037d3a49ad01276e591b872e8a832 (diff) | |
parent | dc5a144991ba803bc8afded105c9db1dea0e57ab (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
sis900: Allocate rx replacement buffer before rx operation
usb-net/pegasus: simplify carrier detection
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sis900.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index dea0126723d..2cb2e156c75 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c @@ -1753,6 +1753,7 @@ static int sis900_rx(struct net_device *net_dev) sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE; } else { struct sk_buff * skb; + struct sk_buff * rx_skb; pci_unmap_single(sis_priv->pci_dev, sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, @@ -1786,10 +1787,10 @@ static int sis900_rx(struct net_device *net_dev) } /* give the socket buffer to upper layers */ - skb = sis_priv->rx_skbuff[entry]; - skb_put(skb, rx_size); - skb->protocol = eth_type_trans(skb, net_dev); - netif_rx(skb); + rx_skb = sis_priv->rx_skbuff[entry]; + skb_put(rx_skb, rx_size); + rx_skb->protocol = eth_type_trans(rx_skb, net_dev); + netif_rx(rx_skb); /* some network statistics */ if ((rx_status & BCAST) == MCAST) |