[PATCH] r8169: support ETHTOOL_GPERMADDR
authorJohn W. Linville <linville@tuxdriver.com>
Mon, 12 Sep 2005 14:48:57 +0000 (10:48 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Wed, 14 Sep 2005 12:30:02 +0000 (08:30 -0400)
Add support for ETHTOOL_GPERMADDR to r8169.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/r8169.c

index f0471d102e3c61bcfc6089c483009e52b2427cfb..cbc60ce365cb96aa4f126f54c1983c6d98940ee7 100644 (file)
@@ -1028,6 +1028,7 @@ static struct ethtool_ops rtl8169_ethtool_ops = {
        .get_strings            = rtl8169_get_strings,
        .get_stats_count        = rtl8169_get_stats_count,
        .get_ethtool_stats      = rtl8169_get_ethtool_stats,
+       .get_perm_addr          = ethtool_op_get_perm_addr,
 };
 
 static void rtl8169_write_gmii_reg_bit(void __iomem *ioaddr, int reg, int bitnum,
@@ -1512,6 +1513,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        /* Get MAC address.  FIXME: read EEPROM */
        for (i = 0; i < MAC_ADDR_LEN; i++)
                dev->dev_addr[i] = RTL_R8(MAC0 + i);
+       memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
 
        dev->open = rtl8169_open;
        dev->hard_start_xmit = rtl8169_start_xmit;