[TG3]: Add support for ETHTOOL_GPERMADDR.
Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4f63b87772
commit
2ff436977e
|
@ -8305,6 +8305,7 @@ static struct ethtool_ops tg3_ethtool_ops = {
|
||||||
.get_ethtool_stats = tg3_get_ethtool_stats,
|
.get_ethtool_stats = tg3_get_ethtool_stats,
|
||||||
.get_coalesce = tg3_get_coalesce,
|
.get_coalesce = tg3_get_coalesce,
|
||||||
.set_coalesce = tg3_set_coalesce,
|
.set_coalesce = tg3_set_coalesce,
|
||||||
|
.get_perm_addr = ethtool_op_get_perm_addr,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __devinit tg3_get_eeprom_size(struct tg3 *tp)
|
static void __devinit tg3_get_eeprom_size(struct tg3 *tp)
|
||||||
|
@ -9783,6 +9784,7 @@ static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp)
|
||||||
if (prom_getproplen(node, "local-mac-address") == 6) {
|
if (prom_getproplen(node, "local-mac-address") == 6) {
|
||||||
prom_getproperty(node, "local-mac-address",
|
prom_getproperty(node, "local-mac-address",
|
||||||
dev->dev_addr, 6);
|
dev->dev_addr, 6);
|
||||||
|
memcpy(dev->perm_addr, dev->dev_addr, 6);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9794,6 +9796,7 @@ static int __devinit tg3_get_default_macaddr_sparc(struct tg3 *tp)
|
||||||
struct net_device *dev = tp->dev;
|
struct net_device *dev = tp->dev;
|
||||||
|
|
||||||
memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
|
memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
|
||||||
|
memcpy(dev->perm_addr, idprom->id_ethaddr, 6);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -9863,6 +9866,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
|
||||||
#endif
|
#endif
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue