Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224976
b: refs/heads/master
c: 0b1c00f
h: refs/heads/master
v: v3
  • Loading branch information
Roopa Prabhu authored and David S. Miller committed Dec 10, 2010
1 parent 25b1981 commit a924249
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 319d7e847355ec7e03d3c865917b2b0e2e592fb8
refs/heads/master: 0b1c00fc3e9f8d658e0632da7e7ee57bed779ec7
3 changes: 2 additions & 1 deletion trunk/drivers/net/enic/enic.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define DRV_NAME "enic"
#define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver"
#define DRV_VERSION "1.4.1.8"
#define DRV_VERSION "1.4.1.9"
#define DRV_COPYRIGHT "Copyright 2008-2010 Cisco Systems, Inc"

#define ENIC_BARS_MAX 6
Expand Down Expand Up @@ -61,6 +61,7 @@ struct enic_port_profile {
char name[PORT_PROFILE_MAX];
u8 instance_uuid[PORT_UUID_MAX];
u8 host_uuid[PORT_UUID_MAX];
u8 vf_mac[ETH_ALEN];
};

/* Per-instance private data structure */
Expand Down
20 changes: 20 additions & 0 deletions trunk/drivers/net/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,23 @@ static int enic_dev_init_done(struct enic *enic, int *done, int *error)
return err;
}

static int enic_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
{
struct enic *enic = netdev_priv(netdev);

if (vf != PORT_SELF_VF)
return -EOPNOTSUPP;

/* Ignore the vf argument for now. We can assume the request
* is coming on a vf.
*/
if (is_valid_ether_addr(mac)) {
memcpy(enic->pp.vf_mac, mac, ETH_ALEN);
return 0;
} else
return -EINVAL;
}

static int enic_set_port_profile(struct enic *enic, u8 *mac)
{
struct vic_provinfo *vp;
Expand Down Expand Up @@ -2411,6 +2428,9 @@ static const struct net_device_ops enic_netdev_dynamic_ops = {
.ndo_tx_timeout = enic_tx_timeout,
.ndo_set_vf_port = enic_set_vf_port,
.ndo_get_vf_port = enic_get_vf_port,
#ifdef IFLA_VF_MAX
.ndo_set_vf_mac = enic_set_vf_mac,
#endif
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = enic_poll_controller,
#endif
Expand Down

0 comments on commit a924249

Please sign in to comment.