X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/546b5ed544503182a9b3e981bc11feebd6042b21..afa983c9915a36083990becb6c7f19abce61bc8f:/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ethtool.c diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ethtool.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ethtool.c index 9aa7b3a23..1f1c6aa77 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ethtool.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ethtool.c @@ -1,7 +1,7 @@ /* * Atheros AR71xx built-in ethernet mac driver * - * Copyright (C) 2008 Gabor Juhos + * Copyright (C) 2008-2010 Gabor Juhos * Copyright (C) 2008 Imre Kaloz * * Based on Atheros' AG7100 driver @@ -44,12 +44,28 @@ static void ag71xx_ethtool_get_drvinfo(struct net_device *dev, strcpy(info->driver, ag->pdev->dev.driver->name); strcpy(info->version, AG71XX_DRV_VERSION); - strcpy(info->bus_info, ag->pdev->dev.bus_id); + strcpy(info->bus_info, dev_name(&ag->pdev->dev)); +} + +static u32 ag71xx_ethtool_get_msglevel(struct net_device *dev) +{ + struct ag71xx *ag = netdev_priv(dev); + + return ag->msg_enable; +} + +static void ag71xx_ethtool_set_msglevel(struct net_device *dev, u32 msg_level) +{ + struct ag71xx *ag = netdev_priv(dev); + + ag->msg_enable = msg_level; } struct ethtool_ops ag71xx_ethtool_ops = { .set_settings = ag71xx_ethtool_set_settings, .get_settings = ag71xx_ethtool_get_settings, .get_drvinfo = ag71xx_ethtool_get_drvinfo, + .get_msglevel = ag71xx_ethtool_get_msglevel, + .set_msglevel = ag71xx_ethtool_set_msglevel, .get_link = ethtool_op_get_link, };