diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 20:49:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 20:49:50 -0400 |
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 dea0126723da..2cb2e156c758 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
@@ -1753,6 +1753,7 @@ static int sis900_rx(struct net_device *net_dev) | |||
1753 | sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE; | 1753 | sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE; |
1754 | } else { | 1754 | } else { |
1755 | struct sk_buff * skb; | 1755 | struct sk_buff * skb; |
1756 | struct sk_buff * rx_skb; | ||
1756 | 1757 | ||
1757 | pci_unmap_single(sis_priv->pci_dev, | 1758 | pci_unmap_single(sis_priv->pci_dev, |
1758 | sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, | 1759 | sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, |
@@ -1786,10 +1787,10 @@ static int sis900_rx(struct net_device *net_dev) | |||
1786 | } | 1787 | } |
1787 | 1788 | ||
1788 | /* give the socket buffer to upper layers */ | 1789 | /* give the socket buffer to upper layers */ |
1789 | skb = sis_priv->rx_skbuff[entry]; | 1790 | rx_skb = sis_priv->rx_skbuff[entry]; |
1790 | skb_put(skb, rx_size); | 1791 | skb_put(rx_skb, rx_size); |
1791 | skb->protocol = eth_type_trans(skb, net_dev); | 1792 | rx_skb->protocol = eth_type_trans(rx_skb, net_dev); |
1792 | netif_rx(skb); | 1793 | netif_rx(rx_skb); |
1793 | 1794 | ||
1794 | /* some network statistics */ | 1795 | /* some network statistics */ |
1795 | if ((rx_status & BCAST) == MCAST) | 1796 | if ((rx_status & BCAST) == MCAST) |