X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fnet%2F3c515.c;h=3bba835f1a214c875352c7335dd251b27e6286d6;hb=820ae8a80eb59962aefbbd4908dfe144ec0f9edb;hp=4a7c32895be52fecbd2ce7ae87d75b639b4dc15a;hpb=3d54015b750e5d5e950a1dcee2735387fd4b6e1a;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c index 4a7c328..3bba835 100644 --- a/drivers/net/3c515.c +++ b/drivers/net/3c515.c @@ -65,7 +65,6 @@ static int max_interrupt_work = 20; #include #include #include -#include #include #include #include @@ -369,8 +368,8 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, struct pnp_dev *idev, int card_number); static int corkscrew_open(struct net_device *dev); static void corkscrew_timer(unsigned long arg); -static int corkscrew_start_xmit(struct sk_buff *skb, - struct net_device *dev); +static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb, + struct net_device *dev); static int corkscrew_rx(struct net_device *dev); static void corkscrew_timeout(struct net_device *dev); static int boomerang_rx(struct net_device *dev); @@ -764,13 +763,14 @@ static int corkscrew_open(struct net_device *dev) /* Use the now-standard shared IRQ implementation. */ if (vp->capabilities == 0x11c7) { /* Corkscrew: Cannot share ISA resources. */ - if (dev->irq == 0 - || dev->dma == 0 - || request_irq(dev->irq, &corkscrew_interrupt, 0, - vp->product_name, dev)) return -EAGAIN; + if (dev->irq == 0 || + dev->dma == 0 || + request_irq(dev->irq, corkscrew_interrupt, 0, + vp->product_name, dev)) + return -EAGAIN; enable_dma(dev->dma); set_dma_mode(dev->dma, DMA_MODE_CASCADE); - } else if (request_irq(dev->irq, &corkscrew_interrupt, IRQF_SHARED, + } else if (request_irq(dev->irq, corkscrew_interrupt, IRQF_SHARED, vp->product_name, dev)) { return -EAGAIN; } @@ -958,7 +958,6 @@ static void corkscrew_timer(unsigned long data) dev->name, media_tbl[dev->if_port].name); #endif /* AUTOMEDIA */ - return; } static void corkscrew_timeout(struct net_device *dev) @@ -992,14 +991,14 @@ static void corkscrew_timeout(struct net_device *dev) if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress)) break; outw(TxEnable, ioaddr + EL3_CMD); - dev->trans_start = jiffies; + dev->trans_start = jiffies; /* prevent tx timeout */ dev->stats.tx_errors++; dev->stats.tx_dropped++; netif_wake_queue(dev); } -static int corkscrew_start_xmit(struct sk_buff *skb, - struct net_device *dev) +static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb, + struct net_device *dev) { struct corkscrew_private *vp = netdev_priv(dev); int ioaddr = dev->base_addr; @@ -1055,8 +1054,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb, prev_entry->status &= ~0x80000000; netif_wake_queue(dev); } - dev->trans_start = jiffies; - return 0; + return NETDEV_TX_OK; } /* Put out the doubleword header... */ outl(skb->len, ioaddr + TX_FIFO); @@ -1091,7 +1089,6 @@ static int corkscrew_start_xmit(struct sk_buff *skb, outw(SetTxThreshold + (1536 >> 2), ioaddr + EL3_CMD); #endif /* bus master */ - dev->trans_start = jiffies; /* Clear the Tx status stack. */ { @@ -1119,7 +1116,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb, outb(0x00, ioaddr + TxStatus); /* Pop the status stack. */ } } - return 0; + return NETDEV_TX_OK; } /* The interrupt handler does all of the Rx thread work and cleans up @@ -1368,8 +1365,8 @@ static int boomerang_rx(struct net_device *dev) /* Check if the packet is long enough to just accept without copying to a properly sized skbuff. */ - if (pkt_len < rx_copybreak - && (skb = dev_alloc_skb(pkt_len + 4)) != NULL) { + if (pkt_len < rx_copybreak && + (skb = dev_alloc_skb(pkt_len + 4)) != NULL) { skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ /* 'skb_put()' points to the start of sk_buff data area. */ memcpy(skb_put(skb, pkt_len), @@ -1518,7 +1515,6 @@ static void update_stats(int ioaddr, struct net_device *dev) /* We change back to window 7 (not 1) with the Vortex. */ EL3WINDOW(7); - return; } /* This new version of set_rx_mode() supports v1.4 kernels. @@ -1535,7 +1531,7 @@ static void set_rx_mode(struct net_device *dev) pr_debug("%s: Setting promiscuous mode.\n", dev->name); new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm; - } else if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) { + } else if (!netdev_mc_empty(dev) || dev->flags & IFF_ALLMULTI) { new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast; } else new_mode = SetRxFilter | RxStation | RxBroadcast;