aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorSergey Ryazanov <ryazanov.s.a@gmail.com>2020-09-06 17:00:08 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-09-06 19:49:37 +0200
commit36e06497f4612a8b7b341dc3834c7281ac8a9b27 (patch)
treeafc69635ac17c7cba33c7788c22ea4bf7ed64e7f /target
parent1a4c1d64bc8c7536cbfc84fd0f11037d09ecd2d3 (diff)
downloadupstream-36e06497f4612a8b7b341dc3834c7281ac8a9b27.tar.gz
upstream-36e06497f4612a8b7b341dc3834c7281ac8a9b27.tar.bz2
upstream-36e06497f4612a8b7b341dc3834c7281ac8a9b27.zip
ath25: fix ethernet supported link modes for ar2313
Rework ethernet supported link modes to linkmode bitmask. This is needed to suppress compilation errors: drivers/net/ethernet/atheros/ar231x/ar231x.c:1153:20: ... error: assignment to expression with array type phydev->supported &= (SUPPORTED_10baseT_Half ^~ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> [cut out of bigger patch, adjust commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ath25/patches-5.4/110-ar2313_ethernet.patch20
1 files changed, 10 insertions, 10 deletions
diff --git a/target/linux/ath25/patches-5.4/110-ar2313_ethernet.patch b/target/linux/ath25/patches-5.4/110-ar2313_ethernet.patch
index 916e57cb36..e4f5fa8d2e 100644
--- a/target/linux/ath25/patches-5.4/110-ar2313_ethernet.patch
+++ b/target/linux/ath25/patches-5.4/110-ar2313_ethernet.patch
@@ -1113,6 +1113,7 @@
+
+static int ar231x_mdiobus_probe(struct net_device *dev)
+{
++ __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
+ struct ar231x_private *const sp = netdev_priv(dev);
+ struct phy_device *phydev = NULL;
+
@@ -1134,16 +1135,15 @@
+ }
+
+ /* mask with MAC supported features */
-+ phydev->supported &= (SUPPORTED_10baseT_Half
-+ | SUPPORTED_10baseT_Full
-+ | SUPPORTED_100baseT_Half
-+ | SUPPORTED_100baseT_Full
-+ | SUPPORTED_Autoneg
-+ /* | SUPPORTED_Pause | SUPPORTED_Asym_Pause */
-+ | SUPPORTED_MII
-+ | SUPPORTED_TP);
-+
-+ phydev->advertising = phydev->supported;
++ linkmode_set_bit_array(phy_10_100_features_array,
++ ARRAY_SIZE(phy_10_100_features_array),
++ mask);
++ linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, mask);
++ linkmode_set_bit(ETHTOOL_LINK_MODE_MII_BIT, mask);
++ linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT, mask);
++
++ linkmode_and(phydev->supported, phydev->supported, mask);
++ linkmode_copy(phydev->advertising, phydev->supported);
+
+ sp->phy_dev = phydev;
+