aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ucc_geth.c
diff options
context:
space:
mode:
authorSergey Matyukevich <geomatsi@gmail.com>2010-06-07 04:38:13 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-12 18:26:07 -0400
commitd19b51499967baddf4f9f12a0067146c2554527a (patch)
tree30e373ca631c13ee3b42099698accf9b127943e9 /drivers/net/ucc_geth.c
parent43d28b6515a6ea580a198df3e253e88236f08978 (diff)
ucc_geth driver: add ioctl
ioctl operation (ndo_do_ioctl) is added to make mii-tools work Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r--drivers/net/ucc_geth.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 4a34833b85dd..538148a3a142 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3702,6 +3702,19 @@ static phy_interface_t to_phy_interface(const char *phy_connection_type)
3702 return PHY_INTERFACE_MODE_MII; 3702 return PHY_INTERFACE_MODE_MII;
3703} 3703}
3704 3704
3705static int ucc_geth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
3706{
3707 struct ucc_geth_private *ugeth = netdev_priv(dev);
3708
3709 if (!netif_running(dev))
3710 return -EINVAL;
3711
3712 if (!ugeth->phydev)
3713 return -ENODEV;
3714
3715 return phy_mii_ioctl(ugeth->phydev, if_mii(rq), cmd);
3716}
3717
3705static const struct net_device_ops ucc_geth_netdev_ops = { 3718static const struct net_device_ops ucc_geth_netdev_ops = {
3706 .ndo_open = ucc_geth_open, 3719 .ndo_open = ucc_geth_open,
3707 .ndo_stop = ucc_geth_close, 3720 .ndo_stop = ucc_geth_close,
@@ -3711,6 +3724,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = {
3711 .ndo_change_mtu = eth_change_mtu, 3724 .ndo_change_mtu = eth_change_mtu,
3712 .ndo_set_multicast_list = ucc_geth_set_multi, 3725 .ndo_set_multicast_list = ucc_geth_set_multi,
3713 .ndo_tx_timeout = ucc_geth_timeout, 3726 .ndo_tx_timeout = ucc_geth_timeout,
3727 .ndo_do_ioctl = ucc_geth_ioctl,
3714#ifdef CONFIG_NET_POLL_CONTROLLER 3728#ifdef CONFIG_NET_POLL_CONTROLLER
3715 .ndo_poll_controller = ucc_netpoll, 3729 .ndo_poll_controller = ucc_netpoll,
3716#endif 3730#endif