ath9k_hw: move the RF claim stuff to AR9002 hardware family
[safe/jmp/linux-2.6] / drivers / net / tehuti.c
index fdf87ea..0c97802 100644 (file)
@@ -66,7 +66,7 @@
 
 #include "tehuti.h"
 
-static struct pci_device_id __devinitdata bdx_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(bdx_pci_tbl) = {
        {0x1FC9, 0x3009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {0x1FC9, 0x3010, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {0x1FC9, 0x3014, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
@@ -419,7 +419,7 @@ static int bdx_hw_start(struct bdx_priv *priv)
        WRITE_REG(priv, regGMAC_RXF_A, GMAC_RX_FILTER_OSEN |
                  GMAC_RX_FILTER_AM | GMAC_RX_FILTER_AB);
 
-#define BDX_IRQ_TYPE   ((priv->nic->irq_type == IRQ_MSI)?0:IRQF_SHARED)
+#define BDX_IRQ_TYPE   ((priv->nic->irq_type == IRQ_MSI) ? 0 : IRQF_SHARED)
 
        rc = request_irq(priv->pdev->irq, bdx_isr_napi, BDX_IRQ_TYPE,
                         ndev->name, ndev);
@@ -824,10 +824,8 @@ static void bdx_setmulti(struct net_device *ndev)
                /* TBD: sort addreses and write them in ascending order
                 * into RX_MAC_MCST regs. we skip this phase now and accept ALL
                 * multicast frames throu IMF */
-               mclist = ndev->mc_list;
-
                /* accept the rest of addresses throu IMF */
-               for (; mclist; mclist = mclist->next) {
+               netdev_for_each_mc_addr(mclist, ndev) {
                        hash = 0;
                        for (i = 0; i < ETH_ALEN; i++)
                                hash ^= mclist->dmi_addr[i];
@@ -1605,7 +1603,7 @@ static inline int bdx_tx_space(struct bdx_priv *priv)
        fsize = f->m.rptr - f->m.wptr;
        if (fsize <= 0)
                fsize = f->m.memsz + fsize;
-       return (fsize);
+       return fsize;
 }
 
 /* bdx_tx_transmit - send packet to NIC
@@ -2295,13 +2293,13 @@ bdx_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ecoal)
 /* Convert RX fifo size to number of pending packets */
 static inline int bdx_rx_fifo_size_to_packets(int rx_size)
 {
-       return ((FIFO_SIZE * (1 << rx_size)) / sizeof(struct rxf_desc));
+       return (FIFO_SIZE * (1 << rx_size)) / sizeof(struct rxf_desc);
 }
 
 /* Convert TX fifo size to number of pending packets */
 static inline int bdx_tx_fifo_size_to_packets(int tx_size)
 {
-       return ((FIFO_SIZE * (1 << tx_size)) / BDX_TXF_DESC_SZ);
+       return (FIFO_SIZE * (1 << tx_size)) / BDX_TXF_DESC_SZ;
 }
 
 /*
@@ -2393,10 +2391,10 @@ static int bdx_get_sset_count(struct net_device *netdev, int stringset)
        case ETH_SS_STATS:
                BDX_ASSERT(ARRAY_SIZE(bdx_stat_names)
                           != sizeof(struct bdx_stats) / sizeof(u64));
-               return ((priv->stats_flag) ? ARRAY_SIZE(bdx_stat_names) : 0);
-       default:
-               return -EINVAL;
+               return (priv->stats_flag) ? ARRAY_SIZE(bdx_stat_names)  : 0;
        }
+
+       return -EINVAL;
 }
 
 /*