]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/hamachi.c
epic100: hamachi: yellowfin: Fix skb allocation size
[mv-sheeva.git] / drivers / net / hamachi.c
index 49aac7027fbb8841f62f11b18492119e02bb0bb1..80d25ed533447735d55804e152bb8d581fc911ef 100644 (file)
@@ -1004,7 +1004,7 @@ static int hamachi_open(struct net_device *dev)
        init_timer(&hmp->timer);
        hmp->timer.expires = RUN_AT((24*HZ)/10);                        /* 2.4 sec. */
        hmp->timer.data = (unsigned long)dev;
-       hmp->timer.function = &hamachi_timer;                           /* timer handler */
+       hmp->timer.function = hamachi_timer;                            /* timer handler */
        add_timer(&hmp->timer);
 
        return 0;
@@ -1202,7 +1202,7 @@ static void hamachi_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(hmp->rx_buf_sz);
+               struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz + 2);
                hmp->rx_skbuff[i] = skb;
                if (skb == NULL)
                        break;
@@ -1669,7 +1669,7 @@ static int hamachi_rx(struct net_device *dev)
                entry = hmp->dirty_rx % RX_RING_SIZE;
                desc = &(hmp->rx_ring[entry]);
                if (hmp->rx_skbuff[entry] == NULL) {
-                       struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz);
+                       struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz + 2);
 
                        hmp->rx_skbuff[entry] = skb;
                        if (skb == NULL)