Skip to content

Commit

Permalink
be2net: ignore VF mac address setting for the same mac
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasundhara Volam authored and David S. Miller committed Aug 2, 2014
1 parent d3d1831 commit 3c31aaf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,12 @@ static int be_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
if (!is_valid_ether_addr(mac) || vf >= adapter->num_vfs)
return -EINVAL;

/* Proceed further only if user provided MAC is different
* from active MAC
*/
if (ether_addr_equal(mac, vf_cfg->mac_addr))
return 0;

if (BEx_chip(adapter)) {
be_cmd_pmac_del(adapter, vf_cfg->if_handle, vf_cfg->pmac_id,
vf + 1);
Expand Down

0 comments on commit 3c31aaf

Please sign in to comment.