aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/enic/enic_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 7e973237bf98..6586b5c7e4b6 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1132,6 +1132,14 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,
1132 switch (request) { 1132 switch (request) {
1133 case PORT_REQUEST_ASSOCIATE: 1133 case PORT_REQUEST_ASSOCIATE:
1134 1134
1135 /* If the interface mac addr hasn't been assigned,
1136 * assign a random mac addr before setting port-
1137 * profile.
1138 */
1139
1140 if (is_zero_ether_addr(netdev->dev_addr))
1141 random_ether_addr(netdev->dev_addr);
1142
1135 if (port[IFLA_PORT_PROFILE]) 1143 if (port[IFLA_PORT_PROFILE])
1136 name = nla_data(port[IFLA_PORT_PROFILE]); 1144 name = nla_data(port[IFLA_PORT_PROFILE]);
1137 1145