From 44b82dded19be8f09d0fee373f395935cef79c41 Mon Sep 17 00:00:00 2001 From: Greg Rose Date: Sat, 21 Apr 2012 00:54:28 +0000 Subject: ixgbe: Fix bogus error message If the VF sends a MACVLAN request with index of zero then it is not actually trying to add a filter. Check the index value and only indicate that operation is not allowed when the VF is actually trying to add a filter. Signed-off-by: Greg Rose Tested-by: Sibai Li Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index b64f1fc8a397..2d971d18696e 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c @@ -640,14 +640,14 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) } break; case IXGBE_VF_SET_MACVLAN: - if (adapter->vfinfo[vf].pf_set_mac) { + index = (msgbuf[0] & IXGBE_VT_MSGINFO_MASK) >> + IXGBE_VT_MSGINFO_SHIFT; + if (adapter->vfinfo[vf].pf_set_mac && index > 0) { e_warn(drv, "VF %d requested MACVLAN filter but is " "administratively denied\n", vf); retval = -1; break; } - index = (msgbuf[0] & IXGBE_VT_MSGINFO_MASK) >> - IXGBE_VT_MSGINFO_SHIFT; /* * If the VF is allowed to set MAC filters then turn off * anti-spoofing to avoid false positives. An index -- cgit v1.2.3-58-ga151