asix fixes
[powerpc.git] / drivers / net / cassini.c
index f44f3d2..7df31b5 100644 (file)
@@ -4443,7 +4443,7 @@ static struct {
        {REG_MAC_COLL_EXCESS},
        {REG_MAC_COLL_LATE}
 };
-#define CAS_REG_LEN    (sizeof(ethtool_register_table)/sizeof(int))
+#define CAS_REG_LEN    ARRAY_SIZE(ethtool_register_table)
 #define CAS_MAX_REGS   (sizeof (u32)*CAS_REG_LEN)
 
 static void cas_read_regs(struct cas *cp, u8 *ptr, int len)
@@ -4772,9 +4772,14 @@ static void cas_get_regs(struct net_device *dev, struct ethtool_regs *regs,
        cas_read_regs(cp, p, regs->len / sizeof(u32));
 }
 
-static int cas_get_stats_count(struct net_device *dev)
+static int cas_get_sset_count(struct net_device *dev, int sset)
 {
-       return CAS_NUM_STAT_KEYS;
+       switch (sset) {
+       case ETH_SS_STATS:
+               return CAS_NUM_STAT_KEYS;
+       default:
+               return -EOPNOTSUPP;
+       }
 }
 
 static void cas_get_strings(struct net_device *dev, u32 stringset, u8 *data)
@@ -4818,7 +4823,7 @@ static const struct ethtool_ops cas_ethtool_ops = {
        .set_msglevel           = cas_set_msglevel,
        .get_regs_len           = cas_get_regs_len,
        .get_regs               = cas_get_regs,
-       .get_stats_count        = cas_get_stats_count,
+       .get_sset_count         = cas_get_sset_count,
        .get_strings            = cas_get_strings,
        .get_ethtool_stats      = cas_get_ethtool_stats,
 };
@@ -4877,6 +4882,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
        int i, err, pci_using_dac;
        u16 pci_cmd;
        u8 orig_cacheline_size = 0, cas_cacheline_size = 0;
+       DECLARE_MAC_BUF(mac);
 
        if (cas_version_printed++ == 0)
                printk(KERN_INFO "%s", version);
@@ -5084,16 +5090,12 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
 
        i = readl(cp->regs + REG_BIM_CFG);
        printk(KERN_INFO "%s: Sun Cassini%s (%sbit/%sMHz PCI/%s) "
-              "Ethernet[%d] ",  dev->name,
+              "Ethernet[%d] %s\n",  dev->name,
               (cp->cas_flags & CAS_FLAG_REG_PLUS) ? "+" : "",
               (i & BIM_CFG_32BIT) ? "32" : "64",
               (i & BIM_CFG_66MHZ) ? "66" : "33",
-              (cp->phy_type == CAS_PHY_SERDES) ? "Fi" : "Cu", pdev->irq);
-
-       for (i = 0; i < 6; i++)
-               printk("%2.2x%c", dev->dev_addr[i],
-                      i == 5 ? ' ' : ':');
-       printk("\n");
+              (cp->phy_type == CAS_PHY_SERDES) ? "Fi" : "Cu", pdev->irq,
+              print_mac(mac, dev->dev_addr));
 
        pci_set_drvdata(pdev, dev);
        cp->hw_running = 1;