lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190309095400.26930-2-mussitantesmortem@gmail.com>
Date:   Sat,  9 Mar 2019 12:53:59 +0300
From:   Maxim Zhukov <mussitantesmortem@...il.com>
To:     Matthias Brugger <matthias.bgg@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Maxim Zhukov <mussitantesmortem@...il.com>
Subject: [PATCH 1/2] staging, mt7621-eth: fix api for linkmode bitmap

Start using new api for linkmode bitmap

Fixed build after 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode")

Signed-off-by: Maxim Zhukov <mussitantesmortem@...il.com>
---
 drivers/staging/mt7621-eth/mdio.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/mt7621-eth/mdio.c b/drivers/staging/mt7621-eth/mdio.c
index 5fea6a447eed..142d7a082dd3 100644
--- a/drivers/staging/mt7621-eth/mdio.c
+++ b/drivers/staging/mt7621-eth/mdio.c
@@ -89,8 +89,12 @@ int mtk_connect_phy_node(struct mtk_eth *eth, struct mtk_mac *mac,
 		return -ENODEV;
 	}
 
-	phydev->supported &= PHY_1000BT_FEATURES;
-	phydev->advertising = phydev->supported;
+	linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
+			 phydev->supported);
+	linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
+			 phydev->supported);
+
+	linkmode_copy(phydev->advertising, phydev->supported);
 
 	dev_info(eth->dev,
 		 "connected port %d to PHY at %s [uid=%08x, driver=%s]\n",
@@ -113,7 +117,9 @@ static void phy_init(struct mtk_eth *eth, struct mtk_mac *mac,
 	phy->speed = 0;
 	phy->duplex = 0;
 	phy_set_max_speed(phy, SPEED_100);
-	phy->advertising = phy->supported | ADVERTISED_Autoneg;
+	linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
+			 phy->advertising);
+
 
 	phy_start_aneg(phy);
 }
-- 
2.21.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ