Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352019
b: refs/heads/master
c: 1b13c97
h: refs/heads/master
i:
  352017: 9826f4a
  352015: 0be0831
v: v3
  • Loading branch information
Yan Burman authored and David S. Miller committed Jan 31, 2013
1 parent 7b7b8e6 commit ab90bd9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c33e7b05f1411b97cd0260ae682fc1cdb27bfaa4
refs/heads/master: 1b13c97fae9c61dc20db8e0d0a72a29df29ac377
15 changes: 15 additions & 0 deletions trunk/drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <linux/hash.h>
#include <linux/ethtool.h>
#include <net/arp.h>
#include <net/ndisc.h>
#include <net/ip.h>
Expand Down Expand Up @@ -1271,6 +1272,18 @@ static int vxlan_validate(struct nlattr *tb[], struct nlattr *data[])
return 0;
}

static void vxlan_get_drvinfo(struct net_device *netdev,
struct ethtool_drvinfo *drvinfo)
{
strlcpy(drvinfo->version, VXLAN_VERSION, sizeof(drvinfo->version));
strlcpy(drvinfo->driver, "vxlan", sizeof(drvinfo->driver));
}

static const struct ethtool_ops vxlan_ethtool_ops = {
.get_drvinfo = vxlan_get_drvinfo,
.get_link = ethtool_op_get_link,
};

static int vxlan_newlink(struct net *net, struct net_device *dev,
struct nlattr *tb[], struct nlattr *data[])
{
Expand Down Expand Up @@ -1348,6 +1361,8 @@ static int vxlan_newlink(struct net *net, struct net_device *dev,
vxlan->port_max = ntohs(p->high);
}

SET_ETHTOOL_OPS(dev, &vxlan_ethtool_ops);

err = register_netdevice(dev);
if (!err)
hlist_add_head_rcu(&vxlan->hlist, vni_head(net, vxlan->vni));
Expand Down

0 comments on commit ab90bd9

Please sign in to comment.