diff options
| author | Jon Wetzel <jon_wetzel@dell.com> | 2005-08-20 20:15:54 -0400 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 19:02:44 -0400 |
| commit | a6f9a70578b981321b63786ac8015f17cca4fcbd (patch) | |
| tree | 5cbc50f95419f4d8d5b13186ccc42b293e0e684a /include/linux/ethtool.h | |
| parent | 8cd25c1fcfbf6460983e99091d278187421c1a1d (diff) | |
[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>
Diffstat (limited to 'include/linux/ethtool.h')
| -rw-r--r-- | include/linux/ethtool.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index d7021c391b2b..ed1440ea4c91 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -250,6 +250,12 @@ struct ethtool_stats { | |||
| 250 | u64 data[0]; | 250 | u64 data[0]; |
| 251 | }; | 251 | }; |
| 252 | 252 | ||
| 253 | struct ethtool_perm_addr { | ||
| 254 | u32 cmd; /* ETHTOOL_GPERMADDR */ | ||
| 255 | u32 size; | ||
| 256 | u8 data[0]; | ||
| 257 | }; | ||
| 258 | |||
| 253 | struct net_device; | 259 | struct net_device; |
| 254 | 260 | ||
| 255 | /* Some generic methods drivers may use in their ethtool_ops */ | 261 | /* Some generic methods drivers may use in their ethtool_ops */ |
| @@ -261,6 +267,8 @@ u32 ethtool_op_get_sg(struct net_device *dev); | |||
| 261 | int ethtool_op_set_sg(struct net_device *dev, u32 data); | 267 | int ethtool_op_set_sg(struct net_device *dev, u32 data); |
| 262 | u32 ethtool_op_get_tso(struct net_device *dev); | 268 | u32 ethtool_op_get_tso(struct net_device *dev); |
| 263 | int ethtool_op_set_tso(struct net_device *dev, u32 data); | 269 | int ethtool_op_set_tso(struct net_device *dev, u32 data); |
| 270 | int ethtool_op_get_perm_addr(struct net_device *dev, | ||
| 271 | struct ethtool_perm_addr *addr, u8 *data); | ||
| 264 | 272 | ||
| 265 | /** | 273 | /** |
| 266 | * ðtool_ops - Alter and report network device settings | 274 | * ðtool_ops - Alter and report network device settings |
| @@ -294,7 +302,8 @@ int ethtool_op_set_tso(struct net_device *dev, u32 data); | |||
| 294 | * get_strings: Return a set of strings that describe the requested objects | 302 | * get_strings: Return a set of strings that describe the requested objects |
| 295 | * phys_id: Identify the device | 303 | * phys_id: Identify the device |
| 296 | * get_stats: Return statistics about the device | 304 | * get_stats: Return statistics about the device |
| 297 | * | 305 | * get_perm_addr: Gets the permanent hardware address |
| 306 | * | ||
| 298 | * Description: | 307 | * Description: |
| 299 | * | 308 | * |
| 300 | * get_settings: | 309 | * get_settings: |
| @@ -352,6 +361,7 @@ struct ethtool_ops { | |||
| 352 | int (*phys_id)(struct net_device *, u32); | 361 | int (*phys_id)(struct net_device *, u32); |
| 353 | int (*get_stats_count)(struct net_device *); | 362 | int (*get_stats_count)(struct net_device *); |
| 354 | void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); | 363 | void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); |
| 364 | int (*get_perm_addr)(struct net_device *, struct ethtool_perm_addr *, u8 *); | ||
| 355 | int (*begin)(struct net_device *); | 365 | int (*begin)(struct net_device *); |
| 356 | void (*complete)(struct net_device *); | 366 | void (*complete)(struct net_device *); |
| 357 | }; | 367 | }; |
| @@ -389,6 +399,7 @@ struct ethtool_ops { | |||
| 389 | #define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */ | 399 | #define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */ |
| 390 | #define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */ | 400 | #define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */ |
| 391 | #define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */ | 401 | #define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */ |
| 402 | #define ETHTOOL_GPERMADDR 0x00000020 /* Get permanent hardware address */ | ||
| 392 | 403 | ||
| 393 | /* compatibility with older code */ | 404 | /* compatibility with older code */ |
| 394 | #define SPARC_ETH_GSET ETHTOOL_GSET | 405 | #define SPARC_ETH_GSET ETHTOOL_GSET |
