aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbevf/vf.c
diff options
context:
space:
mode:
authorEmil Tantilov <emil.s.tantilov@intel.com>2016-02-10 15:16:30 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-03-29 22:53:42 -0700
commit32ca68683532ab629d16cede1102b36ae5346f40 (patch)
tree99f39567607b497f18681a1874203a6a048e7c33 /drivers/net/ethernet/intel/ixgbevf/vf.c
parentixgbevf: call ndo_stop() instead of dev_close() when running offline selftest (diff)
downloadlinux-dev-32ca68683532ab629d16cede1102b36ae5346f40.tar.xz
linux-dev-32ca68683532ab629d16cede1102b36ae5346f40.zip
ixgbevf: fix error code path when setting MAC address
Return error when a MAC address change is rejected by the PF. This will prevent the user from modifying the MAC address when that operation is not permitted. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/vf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c
index 61a98f4c5746..4d613a4f2a7f 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.c
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.c
@@ -408,8 +408,10 @@ static s32 ixgbevf_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr,
/* if nacked the address was rejected, use "perm_addr" */
if (!ret_val &&
- (msgbuf[0] == (IXGBE_VF_SET_MAC_ADDR | IXGBE_VT_MSGTYPE_NACK)))
+ (msgbuf[0] == (IXGBE_VF_SET_MAC_ADDR | IXGBE_VT_MSGTYPE_NACK))) {
ixgbevf_get_mac_addr_vf(hw, hw->mac.addr);
+ return IXGBE_ERR_MBX;
+ }
return ret_val;
}