aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasundhara Volam <vasundhara.volam@emulex.com>2014-08-01 08:17:31 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-02 18:59:17 -0400
commit3c31aaf340387a209b6f7036adaa8522a1cd7f18 (patch)
treed47fdb2ce0a5fc5d72eb1ecffdfe597de9475d76
parentd3d183126de8e100b003d09b64c6ec4b1c93abfc (diff)
be2net: ignore VF mac address setting for the same mac
ndo_set_vf_mac() call may be issued for a mac-addr that is already active on a VF. If so, silently ignore the request. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index da4d3863bd18..db4ff14ff18f 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1270,6 +1270,12 @@ static int be_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
1270 if (!is_valid_ether_addr(mac) || vf >= adapter->num_vfs) 1270 if (!is_valid_ether_addr(mac) || vf >= adapter->num_vfs)
1271 return -EINVAL; 1271 return -EINVAL;
1272 1272
1273 /* Proceed further only if user provided MAC is different
1274 * from active MAC
1275 */
1276 if (ether_addr_equal(mac, vf_cfg->mac_addr))
1277 return 0;
1278
1273 if (BEx_chip(adapter)) { 1279 if (BEx_chip(adapter)) {
1274 be_cmd_pmac_del(adapter, vf_cfg->if_handle, vf_cfg->pmac_id, 1280 be_cmd_pmac_del(adapter, vf_cfg->if_handle, vf_cfg->pmac_id,
1275 vf + 1); 1281 vf + 1);