diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-12-08 19:52:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-08 19:52:37 -0500 |
commit | 8e586137e6b63af1e881b328466ab5ffbe562510 (patch) | |
tree | da0767e1b1361aa24bd32f485453079e31854c0c /drivers/net/ethernet/intel/ixgbevf | |
parent | 7da82c06ded105bf601bfa0eafc92e84eb0ceeed (diff) |
net: make vlan ndo_vlan_rx_[add/kill]_vid return error value
Let caller know the result of adding/removing vlan id to/from vlan
filter.
In some drivers I make those functions to just return 0. But in those
where there is able to see if hw setup went correctly, return value is
set appropriately.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 5d1a64398169..891162d1610c 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |||
@@ -1403,7 +1403,7 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter *adapter) | |||
1403 | } | 1403 | } |
1404 | } | 1404 | } |
1405 | 1405 | ||
1406 | static void ixgbevf_vlan_rx_add_vid(struct net_device *netdev, u16 vid) | 1406 | static int ixgbevf_vlan_rx_add_vid(struct net_device *netdev, u16 vid) |
1407 | { | 1407 | { |
1408 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); | 1408 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); |
1409 | struct ixgbe_hw *hw = &adapter->hw; | 1409 | struct ixgbe_hw *hw = &adapter->hw; |
@@ -1412,9 +1412,11 @@ static void ixgbevf_vlan_rx_add_vid(struct net_device *netdev, u16 vid) | |||
1412 | if (hw->mac.ops.set_vfta) | 1412 | if (hw->mac.ops.set_vfta) |
1413 | hw->mac.ops.set_vfta(hw, vid, 0, true); | 1413 | hw->mac.ops.set_vfta(hw, vid, 0, true); |
1414 | set_bit(vid, adapter->active_vlans); | 1414 | set_bit(vid, adapter->active_vlans); |
1415 | |||
1416 | return 0; | ||
1415 | } | 1417 | } |
1416 | 1418 | ||
1417 | static void ixgbevf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | 1419 | static int ixgbevf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) |
1418 | { | 1420 | { |
1419 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); | 1421 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); |
1420 | struct ixgbe_hw *hw = &adapter->hw; | 1422 | struct ixgbe_hw *hw = &adapter->hw; |
@@ -1423,6 +1425,8 @@ static void ixgbevf_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | |||
1423 | if (hw->mac.ops.set_vfta) | 1425 | if (hw->mac.ops.set_vfta) |
1424 | hw->mac.ops.set_vfta(hw, vid, 0, false); | 1426 | hw->mac.ops.set_vfta(hw, vid, 0, false); |
1425 | clear_bit(vid, adapter->active_vlans); | 1427 | clear_bit(vid, adapter->active_vlans); |
1428 | |||
1429 | return 0; | ||
1426 | } | 1430 | } |
1427 | 1431 | ||
1428 | static void ixgbevf_restore_vlan(struct ixgbevf_adapter *adapter) | 1432 | static void ixgbevf_restore_vlan(struct ixgbevf_adapter *adapter) |