X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fnet%2Famd8111e.c;h=585c25f4b60c27437043eacbea291d137a60a210;hb=7a9b149212f3716c598afe973b6261fd58453b7a;hp=545c791f477effd30e012f656fe544c76a20a346;hpb=a3aa18842a5303fc28fcc4d57dbd16618bd830a0;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 545c791..585c25f 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c @@ -73,7 +73,6 @@ Revision History: #include #include #include -#include #include #include #include @@ -1176,8 +1175,7 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id) /* Schedule a polling routine */ __napi_schedule(&lp->napi); } else if (intren0 & RINTEN0) { - printk("************Driver bug! \ - interrupt while in poll\n"); + printk("************Driver bug! interrupt while in poll\n"); /* Fix by disable receive interrupts */ writel(RINTEN0, mmio + INTEN0); } @@ -1341,8 +1339,6 @@ static netdev_tx_t amd8111e_start_xmit(struct sk_buff *skb, writel( VAL1 | TDMD0, lp->mmio + CMD0); writel( VAL2 | RDMD0,lp->mmio + CMD0); - dev->trans_start = jiffies; - if(amd8111e_tx_queue_avail(lp) < 0){ netif_stop_queue(dev); } @@ -1378,28 +1374,28 @@ list to the device. */ static void amd8111e_set_multicast_list(struct net_device *dev) { - struct dev_mc_list* mc_ptr; + struct netdev_hw_addr *ha; struct amd8111e_priv *lp = netdev_priv(dev); u32 mc_filter[2] ; - int i,bit_num; + int bit_num; + if(dev->flags & IFF_PROMISC){ writel( VAL2 | PROM, lp->mmio + CMD2); return; } else writel( PROM, lp->mmio + CMD2); - if(dev->flags & IFF_ALLMULTI || dev->mc_count > MAX_FILTER_SIZE){ + if (dev->flags & IFF_ALLMULTI || + netdev_mc_count(dev) > MAX_FILTER_SIZE) { /* get all multicast packet */ mc_filter[1] = mc_filter[0] = 0xffffffff; - lp->mc_list = dev->mc_list; lp->options |= OPTION_MULTICAST_ENABLE; amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); return; } - if( dev->mc_count == 0 ){ + if (netdev_mc_empty(dev)) { /* get only own packets */ mc_filter[1] = mc_filter[0] = 0; - lp->mc_list = NULL; lp->options &= ~OPTION_MULTICAST_ENABLE; amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); /* disable promiscous mode */ @@ -1408,11 +1404,9 @@ static void amd8111e_set_multicast_list(struct net_device *dev) } /* load all the multicast addresses in the logic filter */ lp->options |= OPTION_MULTICAST_ENABLE; - lp->mc_list = dev->mc_list; mc_filter[1] = mc_filter[0] = 0; - for (i = 0, mc_ptr = dev->mc_list; mc_ptr && i < dev->mc_count; - i++, mc_ptr = mc_ptr->next) { - bit_num = (ether_crc_le(ETH_ALEN, mc_ptr->dmi_addr) >> 26) & 0x3f; + netdev_for_each_mc_addr(ha, dev) { + bit_num = (ether_crc_le(ETH_ALEN, ha->addr) >> 26) & 0x3f; mc_filter[bit_num >> 5] |= 1 << (bit_num & 31); } amd8111e_writeq(*(u64*)mc_filter,lp->mmio+ LADRF);