[NET]: Add support for getting the permanent hardware address.
This patch adds a new field to net device to hold the permanent hardware address, and adds a new generic ethtool_op function to get that address. Signed-off-by: Jon Wetzel <jon_wetzel@dell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
8cd25c1fcf
commit
a6f9a70578
@ -250,6 +250,12 @@ struct ethtool_stats {
|
||||
u64 data[0];
|
||||
};
|
||||
|
||||
struct ethtool_perm_addr {
|
||||
u32 cmd; /* ETHTOOL_GPERMADDR */
|
||||
u32 size;
|
||||
u8 data[0];
|
||||
};
|
||||
|
||||
struct net_device;
|
||||
|
||||
/* Some generic methods drivers may use in their ethtool_ops */
|
||||
@ -261,6 +267,8 @@ u32 ethtool_op_get_sg(struct net_device *dev);
|
||||
int ethtool_op_set_sg(struct net_device *dev, u32 data);
|
||||
u32 ethtool_op_get_tso(struct net_device *dev);
|
||||
int ethtool_op_set_tso(struct net_device *dev, u32 data);
|
||||
int ethtool_op_get_perm_addr(struct net_device *dev,
|
||||
struct ethtool_perm_addr *addr, u8 *data);
|
||||
|
||||
/**
|
||||
* ðtool_ops - Alter and report network device settings
|
||||
@ -294,7 +302,8 @@ int ethtool_op_set_tso(struct net_device *dev, u32 data);
|
||||
* get_strings: Return a set of strings that describe the requested objects
|
||||
* phys_id: Identify the device
|
||||
* get_stats: Return statistics about the device
|
||||
*
|
||||
* get_perm_addr: Gets the permanent hardware address
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
* get_settings:
|
||||
@ -352,6 +361,7 @@ struct ethtool_ops {
|
||||
int (*phys_id)(struct net_device *, u32);
|
||||
int (*get_stats_count)(struct net_device *);
|
||||
void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
|
||||
int (*get_perm_addr)(struct net_device *, struct ethtool_perm_addr *, u8 *);
|
||||
int (*begin)(struct net_device *);
|
||||
void (*complete)(struct net_device *);
|
||||
};
|
||||
@ -389,6 +399,7 @@ struct ethtool_ops {
|
||||
#define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */
|
||||
#define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */
|
||||
#define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */
|
||||
#define ETHTOOL_GPERMADDR 0x00000020 /* Get permanent hardware address */
|
||||
|
||||
/* compatibility with older code */
|
||||
#define SPARC_ETH_GSET ETHTOOL_GSET
|
||||
|
Reference in New Issue
Block a user