summaryrefslogtreecommitdiff
path: root/drivers/net/sundance.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-01-03 22:55:21 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-01-03 22:55:21 +0000
commit04228460a3ded723b2da09141c76c45ddd712caf (patch)
treedb7b9143b150ead1e9fec10760a1d5ff4045a5e7 /drivers/net/sundance.c
parent7c0ab43e6ab09d72dc8dbac2521b2f819ccc4026 (diff)
parent24c78557741395e038e83f25367cf2bfd7f582b8 (diff)
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r--drivers/net/sundance.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index 3ed2a67bd6d..b409d7ec4ac 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -1016,7 +1016,7 @@ static void init_ring(struct net_device *dev)
/* Fill in the Rx buffers. Handle allocation failure gracefully. */
for (i = 0; i < RX_RING_SIZE; i++) {
- struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz);
+ struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz + 2);
np->rx_skbuff[i] = skb;
if (skb == NULL)
break;
@@ -1407,7 +1407,7 @@ static void refill_rx (struct net_device *dev)
struct sk_buff *skb;
entry = np->dirty_rx % RX_RING_SIZE;
if (np->rx_skbuff[entry] == NULL) {
- skb = dev_alloc_skb(np->rx_buf_sz);
+ skb = dev_alloc_skb(np->rx_buf_sz + 2);
np->rx_skbuff[entry] = skb;
if (skb == NULL)
break; /* Better luck next round. */