]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/via-velocity.c
via-velocity: fix memory corruption when changing the mtu
[linux-2.6-omap-h63xx.git] / drivers / net / via-velocity.c
index a368d08e7d1927fbcaa825b2efe639598b470598..ed1f837c8fda2274a3874855550f1d39e81f1bcd 100644 (file)
@@ -61,7 +61,6 @@
 #include <linux/timer.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
-#include <linux/version.h>
 #include <linux/string.h>
 #include <linux/wait.h>
 #include <asm/io.h>
@@ -792,7 +791,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
 #endif
 
        if (vptr->flags & VELOCITY_FLAGS_TX_CSUM) {
-               dev->features |= NETIF_F_HW_CSUM;
+               dev->features |= NETIF_F_IP_CSUM;
        }
 
        ret = register_netdev(dev);
@@ -1107,6 +1106,9 @@ static void velocity_free_rd_ring(struct velocity_info *vptr)
 
        for (i = 0; i < vptr->options.numrx; i++) {
                struct velocity_rd_info *rd_info = &(vptr->rd_info[i]);
+               struct rx_desc *rd = vptr->rd_ring + i;
+
+               memset(rd, 0, sizeof(*rd));
 
                if (!rd_info->skb)
                        continue;