diff options
Diffstat (limited to 'drivers/net/3c515.c')
-rw-r--r-- | drivers/net/3c515.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 4adcb950f5f1..2e17837be546 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c | |||
@@ -65,7 +65,6 @@ static int max_interrupt_work = 20; | |||
65 | #include <linux/errno.h> | 65 | #include <linux/errno.h> |
66 | #include <linux/in.h> | 66 | #include <linux/in.h> |
67 | #include <linux/ioport.h> | 67 | #include <linux/ioport.h> |
68 | #include <linux/slab.h> | ||
69 | #include <linux/skbuff.h> | 68 | #include <linux/skbuff.h> |
70 | #include <linux/etherdevice.h> | 69 | #include <linux/etherdevice.h> |
71 | #include <linux/interrupt.h> | 70 | #include <linux/interrupt.h> |
@@ -764,13 +763,14 @@ static int corkscrew_open(struct net_device *dev) | |||
764 | /* Use the now-standard shared IRQ implementation. */ | 763 | /* Use the now-standard shared IRQ implementation. */ |
765 | if (vp->capabilities == 0x11c7) { | 764 | if (vp->capabilities == 0x11c7) { |
766 | /* Corkscrew: Cannot share ISA resources. */ | 765 | /* Corkscrew: Cannot share ISA resources. */ |
767 | if (dev->irq == 0 | 766 | if (dev->irq == 0 || |
768 | || dev->dma == 0 | 767 | dev->dma == 0 || |
769 | || request_irq(dev->irq, &corkscrew_interrupt, 0, | 768 | request_irq(dev->irq, corkscrew_interrupt, 0, |
770 | vp->product_name, dev)) return -EAGAIN; | 769 | vp->product_name, dev)) |
770 | return -EAGAIN; | ||
771 | enable_dma(dev->dma); | 771 | enable_dma(dev->dma); |
772 | set_dma_mode(dev->dma, DMA_MODE_CASCADE); | 772 | set_dma_mode(dev->dma, DMA_MODE_CASCADE); |
773 | } else if (request_irq(dev->irq, &corkscrew_interrupt, IRQF_SHARED, | 773 | } else if (request_irq(dev->irq, corkscrew_interrupt, IRQF_SHARED, |
774 | vp->product_name, dev)) { | 774 | vp->product_name, dev)) { |
775 | return -EAGAIN; | 775 | return -EAGAIN; |
776 | } | 776 | } |
@@ -1368,8 +1368,8 @@ static int boomerang_rx(struct net_device *dev) | |||
1368 | 1368 | ||
1369 | /* Check if the packet is long enough to just accept without | 1369 | /* Check if the packet is long enough to just accept without |
1370 | copying to a properly sized skbuff. */ | 1370 | copying to a properly sized skbuff. */ |
1371 | if (pkt_len < rx_copybreak | 1371 | if (pkt_len < rx_copybreak && |
1372 | && (skb = dev_alloc_skb(pkt_len + 4)) != NULL) { | 1372 | (skb = dev_alloc_skb(pkt_len + 4)) != NULL) { |
1373 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ | 1373 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ |
1374 | /* 'skb_put()' points to the start of sk_buff data area. */ | 1374 | /* 'skb_put()' points to the start of sk_buff data area. */ |
1375 | memcpy(skb_put(skb, pkt_len), | 1375 | memcpy(skb_put(skb, pkt_len), |
@@ -1535,7 +1535,7 @@ static void set_rx_mode(struct net_device *dev) | |||
1535 | pr_debug("%s: Setting promiscuous mode.\n", | 1535 | pr_debug("%s: Setting promiscuous mode.\n", |
1536 | dev->name); | 1536 | dev->name); |
1537 | new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm; | 1537 | new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm; |
1538 | } else if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) { | 1538 | } else if (!netdev_mc_empty(dev) || dev->flags & IFF_ALLMULTI) { |
1539 | new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast; | 1539 | new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast; |
1540 | } else | 1540 | } else |
1541 | new_mode = SetRxFilter | RxStation | RxBroadcast; | 1541 | new_mode = SetRxFilter | RxStation | RxBroadcast; |