Skip to content

Commit

Permalink
[PATCH] via-rhine: support ETHTOOL_GPERMADDR
Browse files Browse the repository at this point in the history
Add support for ETHTOOL_GPERMADDR to via-rhine.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
John W. Linville authored and Jeff Garzik committed Sep 14, 2005
1 parent 30d60a8 commit b81e8e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/via-rhine.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,9 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,

for (i = 0; i < 6; i++)
dev->dev_addr[i] = ioread8(ioaddr + StationAddr + i);
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);

if (!is_valid_ether_addr(dev->dev_addr)) {
if (!is_valid_ether_addr(dev->perm_addr)) {
rc = -EIO;
printk(KERN_ERR "Invalid MAC address\n");
goto err_out_unmap;
Expand Down Expand Up @@ -1829,6 +1830,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
.set_wol = rhine_set_wol,
.get_sg = ethtool_op_get_sg,
.get_tx_csum = ethtool_op_get_tx_csum,
.get_perm_addr = ethtool_op_get_perm_addr,
};

static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
Expand Down

0 comments on commit b81e8e1

Please sign in to comment.