aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-02-08 09:13:18 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-02-08 09:13:18 +0000
commitaa044419043000c748bd8de9942ff871ac36eb50 (patch)
tree91da7e10686127e3e1e66ec9f32ed174e252071f /target
parent9c1f95a4164ac4f1ff254decf8278f910c5f4d57 (diff)
downloadupstream-aa044419043000c748bd8de9942ff871ac36eb50.tar.gz
upstream-aa044419043000c748bd8de9942ff871ac36eb50.tar.bz2
upstream-aa044419043000c748bd8de9942ff871ac36eb50.zip
generic: ar8216: simplify phy features setup
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35518
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index d980e24ee1..e6a460734f 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1791,12 +1791,13 @@ ar8216_config_init(struct phy_device *pdev)
if (ret)
goto err_free_priv;
- if (pdev->addr != 0) {
- if (ar8xxx_has_gige(priv)) {
- pdev->supported |= SUPPORTED_1000baseT_Full;
- pdev->advertising |= ADVERTISED_1000baseT_Full;
- }
+ if (ar8xxx_has_gige(priv))
+ pdev->supported = SUPPORTED_1000baseT_Full;
+ else
+ pdev->supported = SUPPORTED_100baseT_Full;
+ pdev->advertising = pdev->supported;
+ if (pdev->addr != 0) {
if (chip_is_ar8316(priv)) {
/* check if we're attaching to the switch twice */
pdev = pdev->bus->phy_map[0];
@@ -1827,12 +1828,6 @@ ar8216_config_init(struct phy_device *pdev)
return 0;
}
- if (ar8xxx_has_gige(priv))
- pdev->supported = SUPPORTED_1000baseT_Full;
- else
- pdev->supported = SUPPORTED_100baseT_Full;
- pdev->advertising = pdev->supported;
-
mutex_init(&priv->reg_mutex);
pdev->priv = priv;