Commit 7f51c587 authored by Flavio Leitner's avatar Flavio Leitner Committed by David S. Miller

team: add ethtool support

This patch adds few ethtool operations to team driver.
Signed-off-by: default avatarFlavio Leitner <fbl@redhat.com>
Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8093315a
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <net/genetlink.h> #include <net/genetlink.h>
#include <net/netlink.h> #include <net/netlink.h>
#include <net/sch_generic.h> #include <net/sch_generic.h>
#include <generated/utsrelease.h>
#include <linux/if_team.h> #include <linux/if_team.h>
#define DRV_NAME "team" #define DRV_NAME "team"
...@@ -1741,6 +1742,21 @@ static const struct net_device_ops team_netdev_ops = { ...@@ -1741,6 +1742,21 @@ static const struct net_device_ops team_netdev_ops = {
.ndo_change_carrier = team_change_carrier, .ndo_change_carrier = team_change_carrier,
}; };
/***********************
* ethtool interface
***********************/
static void team_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *drvinfo)
{
strncpy(drvinfo->driver, DRV_NAME, 32);
strncpy(drvinfo->version, UTS_RELEASE, 32);
}
static const struct ethtool_ops team_ethtool_ops = {
.get_drvinfo = team_ethtool_get_drvinfo,
.get_link = ethtool_op_get_link,
};
/*********************** /***********************
* rt netlink interface * rt netlink interface
...@@ -1790,6 +1806,7 @@ static void team_setup(struct net_device *dev) ...@@ -1790,6 +1806,7 @@ static void team_setup(struct net_device *dev)
ether_setup(dev); ether_setup(dev);
dev->netdev_ops = &team_netdev_ops; dev->netdev_ops = &team_netdev_ops;
dev->ethtool_ops = &team_ethtool_ops;
dev->destructor = team_destructor; dev->destructor = team_destructor;
dev->tx_queue_len = 0; dev->tx_queue_len = 0;
dev->flags |= IFF_MULTICAST; dev->flags |= IFF_MULTICAST;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment