Skip to content

Commit

Permalink
ethtool: remove phys_id from ethtool_ops
Browse files Browse the repository at this point in the history
After that all the upstream kernel drivers now use phys_id,
and the old ethtool_ops interface (phys_id) can be removed.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed May 8, 2011
1 parent 534eacb commit 1ab7b6a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
7 changes: 0 additions & 7 deletions include/linux/ethtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -814,12 +814,6 @@ bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported);
* the indicator accordingly. Finally, it is called with the argument
* %ETHTOOL_ID_INACTIVE and must deactivate the indicator. Returns a
* negative error code or zero.
* @phys_id: Deprecated in favour of @set_phys_id.
* Identify the physical device, e.g. by flashing an LED
* attached to it until interrupted by a signal or the given time
* (in seconds) elapses. If the given time is zero, use a default
* time limit. Returns a negative error code or zero. Being
* interrupted by a signal is not an error.
* @get_ethtool_stats: Return extended statistics about the device.
* This is only useful if the device maintains statistics not
* included in &struct rtnl_link_stats64.
Expand Down Expand Up @@ -908,7 +902,6 @@ struct ethtool_ops {
void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
void (*get_strings)(struct net_device *, u32 stringset, u8 *);
int (*set_phys_id)(struct net_device *, enum ethtool_phys_id_state);
int (*phys_id)(struct net_device *, u32);
void (*get_ethtool_stats)(struct net_device *,
struct ethtool_stats *, u64 *);
int (*begin)(struct net_device *);
Expand Down
6 changes: 1 addition & 5 deletions net/core/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ static int ethtool_phys_id(struct net_device *dev, void __user *useraddr)
static bool busy;
int rc;

if (!dev->ethtool_ops->set_phys_id && !dev->ethtool_ops->phys_id)
if (!dev->ethtool_ops->set_phys_id)
return -EOPNOTSUPP;

if (busy)
Expand All @@ -1664,10 +1664,6 @@ static int ethtool_phys_id(struct net_device *dev, void __user *useraddr)
if (copy_from_user(&id, useraddr, sizeof(id)))
return -EFAULT;

if (!dev->ethtool_ops->set_phys_id)
/* Do it the old way */
return dev->ethtool_ops->phys_id(dev, id.data);

rc = dev->ethtool_ops->set_phys_id(dev, ETHTOOL_ID_ACTIVE);
if (rc < 0)
return rc;
Expand Down

0 comments on commit 1ab7b6a

Please sign in to comment.