diff options
author | Ricardo Ribalda <ricardo.ribalda@gmail.com> | 2011-11-07 18:47:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-08 15:13:38 -0500 |
commit | 8d8bdfe8034399357df58b5f3e4da638a9e9a257 (patch) | |
tree | e186d68afd22156e512a56dbc51d4ced28f979b7 /drivers/net/ethernet/xilinx | |
parent | 2563fa595447bba6a73e6c58c4bbf11ac0f28931 (diff) |
ll_temac: Add support for phy_mii_ioctl
This patch enables the ioctl support for the driver. So userspace
programs like mii-tool can work.
Resend in merge window
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx')
-rw-r--r-- | drivers/net/ethernet/xilinx/ll_temac_main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index caf3659e173c..bbfcb59f69ab 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c | |||
@@ -915,12 +915,26 @@ temac_poll_controller(struct net_device *ndev) | |||
915 | } | 915 | } |
916 | #endif | 916 | #endif |
917 | 917 | ||
918 | static int temac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) | ||
919 | { | ||
920 | struct temac_local *lp = netdev_priv(ndev); | ||
921 | |||
922 | if (!netif_running(ndev)) | ||
923 | return -EINVAL; | ||
924 | |||
925 | if (!lp->phy_dev) | ||
926 | return -EINVAL; | ||
927 | |||
928 | return phy_mii_ioctl(lp->phy_dev, rq, cmd); | ||
929 | } | ||
930 | |||
918 | static const struct net_device_ops temac_netdev_ops = { | 931 | static const struct net_device_ops temac_netdev_ops = { |
919 | .ndo_open = temac_open, | 932 | .ndo_open = temac_open, |
920 | .ndo_stop = temac_stop, | 933 | .ndo_stop = temac_stop, |
921 | .ndo_start_xmit = temac_start_xmit, | 934 | .ndo_start_xmit = temac_start_xmit, |
922 | .ndo_set_mac_address = netdev_set_mac_address, | 935 | .ndo_set_mac_address = netdev_set_mac_address, |
923 | .ndo_validate_addr = eth_validate_addr, | 936 | .ndo_validate_addr = eth_validate_addr, |
937 | .ndo_do_ioctl = temac_ioctl, | ||
924 | #ifdef CONFIG_NET_POLL_CONTROLLER | 938 | #ifdef CONFIG_NET_POLL_CONTROLLER |
925 | .ndo_poll_controller = temac_poll_controller, | 939 | .ndo_poll_controller = temac_poll_controller, |
926 | #endif | 940 | #endif |