Skip to content

Commit 1862923

Browse files
nehebkuba-moo
authored andcommitted
net: ag71xx: use phylink_mii_ioctl
f129461 removed the custom function for ndo_eth_ioctl and used the standard phy_do_ioctl which calls phy_mii_ioctl. However since then, this driver was ported to phylink where it makes more sense to call phylink_mii_ioctl. Bring back custom function that calls phylink_mii_ioctl. Signed-off-by: Rosen Penev <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c89c675 commit 1862923

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/net/ethernet/atheros/ag71xx.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,13 @@ static void ag71xx_int_disable(struct ag71xx *ag, u32 ints)
447447
ag71xx_cb(ag, AG71XX_REG_INT_ENABLE, ints);
448448
}
449449

450+
static int ag71xx_do_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
451+
{
452+
struct ag71xx *ag = netdev_priv(ndev);
453+
454+
return phylink_mii_ioctl(ag->phylink, ifr, cmd);
455+
}
456+
450457
static void ag71xx_get_drvinfo(struct net_device *ndev,
451458
struct ethtool_drvinfo *info)
452459
{
@@ -1799,7 +1806,7 @@ static const struct net_device_ops ag71xx_netdev_ops = {
17991806
.ndo_open = ag71xx_open,
18001807
.ndo_stop = ag71xx_stop,
18011808
.ndo_start_xmit = ag71xx_hard_start_xmit,
1802-
.ndo_eth_ioctl = phy_do_ioctl,
1809+
.ndo_eth_ioctl = ag71xx_do_ioctl,
18031810
.ndo_tx_timeout = ag71xx_tx_timeout,
18041811
.ndo_change_mtu = ag71xx_change_mtu,
18051812
.ndo_set_mac_address = eth_mac_addr,

0 commit comments

Comments
 (0)