diff options
| -rw-r--r-- | drivers/net/ethernet/arc/emac_main.c | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c index a8a1dc9f6725..586bedac457d 100644 --- a/drivers/net/ethernet/arc/emac_main.c +++ b/drivers/net/ethernet/arc/emac_main.c | |||
| @@ -80,42 +80,6 @@ static void arc_emac_adjust_link(struct net_device *ndev) | |||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | /** | 82 | /** |
| 83 | * arc_emac_get_settings - Get PHY settings. | ||
| 84 | * @ndev: Pointer to net_device structure. | ||
| 85 | * @cmd: Pointer to ethtool_cmd structure. | ||
| 86 | * | ||
| 87 | * This implements ethtool command for getting PHY settings. If PHY could | ||
| 88 | * not be found, the function returns -ENODEV. This function calls the | ||
| 89 | * relevant PHY ethtool API to get the PHY settings. | ||
| 90 | * Issue "ethtool ethX" under linux prompt to execute this function. | ||
| 91 | */ | ||
| 92 | static int arc_emac_get_settings(struct net_device *ndev, | ||
| 93 | struct ethtool_cmd *cmd) | ||
| 94 | { | ||
| 95 | return phy_ethtool_gset(ndev->phydev, cmd); | ||
| 96 | } | ||
| 97 | |||
| 98 | /** | ||
| 99 | * arc_emac_set_settings - Set PHY settings as passed in the argument. | ||
| 100 | * @ndev: Pointer to net_device structure. | ||
| 101 | * @cmd: Pointer to ethtool_cmd structure. | ||
| 102 | * | ||
| 103 | * This implements ethtool command for setting various PHY settings. If PHY | ||
| 104 | * could not be found, the function returns -ENODEV. This function calls the | ||
| 105 | * relevant PHY ethtool API to set the PHY. | ||
| 106 | * Issue e.g. "ethtool -s ethX speed 1000" under linux prompt to execute this | ||
| 107 | * function. | ||
| 108 | */ | ||
| 109 | static int arc_emac_set_settings(struct net_device *ndev, | ||
| 110 | struct ethtool_cmd *cmd) | ||
| 111 | { | ||
| 112 | if (!capable(CAP_NET_ADMIN)) | ||
| 113 | return -EPERM; | ||
| 114 | |||
| 115 | return phy_ethtool_sset(ndev->phydev, cmd); | ||
| 116 | } | ||
| 117 | |||
| 118 | /** | ||
| 119 | * arc_emac_get_drvinfo - Get EMAC driver information. | 83 | * arc_emac_get_drvinfo - Get EMAC driver information. |
| 120 | * @ndev: Pointer to net_device structure. | 84 | * @ndev: Pointer to net_device structure. |
| 121 | * @info: Pointer to ethtool_drvinfo structure. | 85 | * @info: Pointer to ethtool_drvinfo structure. |
| @@ -133,10 +97,10 @@ static void arc_emac_get_drvinfo(struct net_device *ndev, | |||
| 133 | } | 97 | } |
| 134 | 98 | ||
| 135 | static const struct ethtool_ops arc_emac_ethtool_ops = { | 99 | static const struct ethtool_ops arc_emac_ethtool_ops = { |
| 136 | .get_settings = arc_emac_get_settings, | ||
| 137 | .set_settings = arc_emac_set_settings, | ||
| 138 | .get_drvinfo = arc_emac_get_drvinfo, | 100 | .get_drvinfo = arc_emac_get_drvinfo, |
| 139 | .get_link = ethtool_op_get_link, | 101 | .get_link = ethtool_op_get_link, |
| 102 | .get_link_ksettings = phy_ethtool_get_link_ksettings, | ||
| 103 | .set_link_ksettings = phy_ethtool_set_link_ksettings, | ||
| 140 | }; | 104 | }; |
| 141 | 105 | ||
| 142 | #define FIRST_OR_LAST_MASK (FIRST_MASK | LAST_MASK) | 106 | #define FIRST_OR_LAST_MASK (FIRST_MASK | LAST_MASK) |
