diff options
-rw-r--r-- | drivers/net/enic/enic.h | 3 | ||||
-rw-r--r-- | drivers/net/enic/enic_main.c | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index 8f374c1e2caf..bd473a9d739a 100644 --- a/drivers/net/enic/enic.h +++ b/drivers/net/enic/enic.h | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #define DRV_NAME "enic" | 33 | #define DRV_NAME "enic" |
34 | #define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver" | 34 | #define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Driver" |
35 | #define DRV_VERSION "1.4.1.8" | 35 | #define DRV_VERSION "1.4.1.9" |
36 | #define DRV_COPYRIGHT "Copyright 2008-2010 Cisco Systems, Inc" | 36 | #define DRV_COPYRIGHT "Copyright 2008-2010 Cisco Systems, Inc" |
37 | 37 | ||
38 | #define ENIC_BARS_MAX 6 | 38 | #define ENIC_BARS_MAX 6 |
@@ -61,6 +61,7 @@ struct enic_port_profile { | |||
61 | char name[PORT_PROFILE_MAX]; | 61 | char name[PORT_PROFILE_MAX]; |
62 | u8 instance_uuid[PORT_UUID_MAX]; | 62 | u8 instance_uuid[PORT_UUID_MAX]; |
63 | u8 host_uuid[PORT_UUID_MAX]; | 63 | u8 host_uuid[PORT_UUID_MAX]; |
64 | u8 vf_mac[ETH_ALEN]; | ||
64 | }; | 65 | }; |
65 | 66 | ||
66 | /* Per-instance private data structure */ | 67 | /* Per-instance private data structure */ |
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 1931f156777c..ddeffb5192ae 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -1231,6 +1231,23 @@ static int enic_dev_init_done(struct enic *enic, int *done, int *error) | |||
1231 | return err; | 1231 | return err; |
1232 | } | 1232 | } |
1233 | 1233 | ||
1234 | static int enic_set_vf_mac(struct net_device *netdev, int vf, u8 *mac) | ||
1235 | { | ||
1236 | struct enic *enic = netdev_priv(netdev); | ||
1237 | |||
1238 | if (vf != PORT_SELF_VF) | ||
1239 | return -EOPNOTSUPP; | ||
1240 | |||
1241 | /* Ignore the vf argument for now. We can assume the request | ||
1242 | * is coming on a vf. | ||
1243 | */ | ||
1244 | if (is_valid_ether_addr(mac)) { | ||
1245 | memcpy(enic->pp.vf_mac, mac, ETH_ALEN); | ||
1246 | return 0; | ||
1247 | } else | ||
1248 | return -EINVAL; | ||
1249 | } | ||
1250 | |||
1234 | static int enic_set_port_profile(struct enic *enic, u8 *mac) | 1251 | static int enic_set_port_profile(struct enic *enic, u8 *mac) |
1235 | { | 1252 | { |
1236 | struct vic_provinfo *vp; | 1253 | struct vic_provinfo *vp; |
@@ -2411,6 +2428,9 @@ static const struct net_device_ops enic_netdev_dynamic_ops = { | |||
2411 | .ndo_tx_timeout = enic_tx_timeout, | 2428 | .ndo_tx_timeout = enic_tx_timeout, |
2412 | .ndo_set_vf_port = enic_set_vf_port, | 2429 | .ndo_set_vf_port = enic_set_vf_port, |
2413 | .ndo_get_vf_port = enic_get_vf_port, | 2430 | .ndo_get_vf_port = enic_get_vf_port, |
2431 | #ifdef IFLA_VF_MAX | ||
2432 | .ndo_set_vf_mac = enic_set_vf_mac, | ||
2433 | #endif | ||
2414 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2434 | #ifdef CONFIG_NET_POLL_CONTROLLER |
2415 | .ndo_poll_controller = enic_poll_controller, | 2435 | .ndo_poll_controller = enic_poll_controller, |
2416 | #endif | 2436 | #endif |