summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.6/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-04-10 11:34:11 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-04-10 11:34:11 +0000
commit3491026cbb6f1ad55c8b4cc63f0c3548028ce2a4 (patch)
tree91f34912b5fdf254c7525d2a9c78caff2e6e59b6 /target/linux/generic-2.6/files
parent6134e99beee0ef8c7fc831e6422f7b0db7580b69 (diff)
downloadmtk-20170518-3491026cbb6f1ad55c8b4cc63f0c3548028ce2a4.zip
mtk-20170518-3491026cbb6f1ad55c8b4cc63f0c3548028ce2a4.tar.gz
mtk-20170518-3491026cbb6f1ad55c8b4cc63f0c3548028ce2a4.tar.bz2
Generic: Clean up output of AR8216 driver.
This patch is rather a cosmetic patch. It fixes the following issues: * Demote the unknown device message to debug level to not spam the log. * Fix the version print of the unknown device message. * Output the 'attach' message only when attaching as switch driver, not when attaching as phy driver. * Correctly return NET_RX_DROP when dropping packets. Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com> Cc: bacfire@openwrt.org SVN-Revision: 20773
Diffstat (limited to 'target/linux/generic-2.6/files')
-rw-r--r--target/linux/generic-2.6/files/drivers/net/phy/ar8216.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/ar8216.c b/target/linux/generic-2.6/files/drivers/net/phy/ar8216.c
index a473e3b..4ae61da 100644
--- a/target/linux/generic-2.6/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic-2.6/files/drivers/net/phy/ar8216.c
@@ -145,10 +145,10 @@ ar8216_id_chip(struct ar8216_priv *priv)
case 0x1001:
return AR8316;
default:
- printk(KERN_ERR
+ printk(KERN_DEBUG
"ar8216: Unknown Atheros device [ver=%d, rev=%d, phy_id=%04x%04x]\n",
- (int)(val >> AR8216_CTRL_VERSION_S),
- (int)(val & AR8216_CTRL_REVISION),
+ (int)(id >> AR8216_CTRL_VERSION_S),
+ (int)(id & AR8216_CTRL_REVISION),
priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 2),
priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 3));
@@ -297,7 +297,7 @@ recv:
error:
/* no vlan? eat the packet! */
dev_kfree_skb_any(skb);
- return 0;
+ return NET_RX_DROP;
}
static int
@@ -646,8 +646,10 @@ ar8216_config_init(struct phy_device *pdev)
priv->chip = ar8216_id_chip(priv);
- printk(KERN_INFO "%s: AR%d PHY driver attached.\n",
- pdev->attached_dev->name, priv->chip);
+ if (pdev->addr == 0)
+ printk(KERN_INFO "%s: AR%d switch driver attached.\n",
+ pdev->attached_dev->name, priv->chip);
+
if (pdev->addr != 0) {
if (priv->chip == AR8316) {