aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic
diff options
context:
space:
mode:
authorRoopa Prabhu <roprabhu@cisco.com>2011-02-04 07:57:16 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-07 14:49:01 -0500
commit8a375557e303e4d082612bc3d79b23502a2a2a38 (patch)
tree1799bb6085bac1d0d5219727022aa1e30fcb0051 /drivers/net/enic
parent6e30dd4e3935ddb4e7dd27d5be7a6e5504e64a27 (diff)
enic: Decouple mac address registration and deregistration from port profile set operation
This patch removes VM mac address registration and deregistration code during port profile set operation. We can delay mac address registration until enic_open. Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r--drivers/net/enic/enic.h2
-rw-r--r--drivers/net/enic/enic_main.c6
2 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index ca3be4f15556..44865bb10c96 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 "2.1.1.2" 35#define DRV_VERSION "2.1.1.2a"
36#define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc" 36#define DRV_COPYRIGHT "Copyright 2008-2011 Cisco Systems, Inc"
37 37
38#define ENIC_BARS_MAX 6 38#define ENIC_BARS_MAX 6
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 89664c670972..37f907b32d68 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1381,9 +1381,6 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,
1381 1381
1382 if (is_zero_ether_addr(netdev->dev_addr)) 1382 if (is_zero_ether_addr(netdev->dev_addr))
1383 random_ether_addr(netdev->dev_addr); 1383 random_ether_addr(netdev->dev_addr);
1384 } else if (new_pp.request == PORT_REQUEST_DISASSOCIATE) {
1385 if (!is_zero_ether_addr(enic->pp.mac_addr))
1386 enic_dev_del_addr(enic, enic->pp.mac_addr);
1387 } 1384 }
1388 1385
1389 memcpy(&enic->pp, &new_pp, sizeof(struct enic_port_profile)); 1386 memcpy(&enic->pp, &new_pp, sizeof(struct enic_port_profile));
@@ -1392,9 +1389,6 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,
1392 if (err) 1389 if (err)
1393 goto set_port_profile_cleanup; 1390 goto set_port_profile_cleanup;
1394 1391
1395 if (!is_zero_ether_addr(enic->pp.mac_addr))
1396 enic_dev_add_addr(enic, enic->pp.mac_addr);
1397
1398set_port_profile_cleanup: 1392set_port_profile_cleanup:
1399 memset(enic->pp.vf_mac, 0, ETH_ALEN); 1393 memset(enic->pp.vf_mac, 0, ETH_ALEN);
1400 1394