diff options
-rw-r--r-- | drivers/net/3c59x.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index e1f773d07edb..78f90eb02b9c 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -1513,9 +1513,10 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1513 | dev->hard_start_xmit = boomerang_start_xmit; | 1513 | dev->hard_start_xmit = boomerang_start_xmit; |
1514 | /* Actually, it still should work with iommu. */ | 1514 | /* Actually, it still should work with iommu. */ |
1515 | dev->features |= NETIF_F_SG; | 1515 | dev->features |= NETIF_F_SG; |
1516 | if (((hw_checksums[card_idx] == -1) && (vp->drv_flags & HAS_HWCKSM)) || | 1516 | if (card_idx < MAX_UNITS && |
1517 | (hw_checksums[card_idx] == 1)) { | 1517 | ((hw_checksums[card_idx] == -1 && (vp->drv_flags & HAS_HWCKSM)) || |
1518 | dev->features |= NETIF_F_IP_CSUM; | 1518 | hw_checksums[card_idx] == 1)) { |
1519 | dev->features |= NETIF_F_IP_CSUM; | ||
1519 | } | 1520 | } |
1520 | } else { | 1521 | } else { |
1521 | dev->hard_start_xmit = vortex_start_xmit; | 1522 | dev->hard_start_xmit = vortex_start_xmit; |
@@ -2791,10 +2792,11 @@ vortex_close(struct net_device *dev) | |||
2791 | } | 2792 | } |
2792 | 2793 | ||
2793 | #if DO_ZEROCOPY | 2794 | #if DO_ZEROCOPY |
2794 | if ( vp->rx_csumhits && | 2795 | if (vp->rx_csumhits && |
2795 | ((vp->drv_flags & HAS_HWCKSM) == 0) && | 2796 | (vp->drv_flags & HAS_HWCKSM) == 0 && |
2796 | (hw_checksums[vp->card_idx] == -1)) { | 2797 | (vp->card_idx >= MAX_UNITS || hw_checksums[vp->card_idx] == -1)) { |
2797 | printk(KERN_WARNING "%s supports hardware checksums, and we're not using them!\n", dev->name); | 2798 | printk(KERN_WARNING "%s supports hardware checksums, and we're " |
2799 | "not using them!\n", dev->name); | ||
2798 | } | 2800 | } |
2799 | #endif | 2801 | #endif |
2800 | 2802 | ||