]> Pileus Git - ~andy/linux/blobdiff - drivers/net/sundance.c
ath5k: Use high bitrates for ACK/CTS
[~andy/linux] / drivers / net / sundance.c
index d58e1891ca604577bb5bd1f0f83c4e09cf9c5ee5..a855934dfc3b4f433e61c9d8c68c948361646420 100644 (file)
@@ -206,7 +206,7 @@ IVc. Errata
 #define USE_IO_OPS 1
 #endif
 
-static const struct pci_device_id sundance_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(sundance_pci_tbl) = {
        { 0x1186, 0x1002, 0x1186, 0x1002, 0, 0, 0 },
        { 0x1186, 0x1002, 0x1186, 0x1003, 0, 0, 1 },
        { 0x1186, 0x1002, 0x1186, 0x1012, 0, 0, 2 },
@@ -1517,19 +1517,18 @@ static void set_rx_mode(struct net_device *dev)
        if (dev->flags & IFF_PROMISC) {                 /* Set promiscuous. */
                memset(mc_filter, 0xff, sizeof(mc_filter));
                rx_mode = AcceptBroadcast | AcceptMulticast | AcceptAll | AcceptMyPhys;
-       } else if ((dev->mc_count > multicast_filter_limit) ||
+       } else if ((netdev_mc_count(dev) > multicast_filter_limit) ||
                   (dev->flags & IFF_ALLMULTI)) {
                /* Too many to match, or accept all multicasts. */
                memset(mc_filter, 0xff, sizeof(mc_filter));
                rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
-       } else if (dev->mc_count) {
+       } else if (!netdev_mc_empty(dev)) {
                struct dev_mc_list *mclist;
                int bit;
                int index;
                int crc;
                memset (mc_filter, 0, sizeof (mc_filter));
-               for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
-                    i++, mclist = mclist->next) {
+               netdev_for_each_mc_addr(mclist, dev) {
                        crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
                        for (index=0, bit=0; bit < 6; bit++, crc <<= 1)
                                if (crc & 0x80000000) index |= 1 << bit;