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/ixgb | |
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/ixgb')
-rw-r--r-- | drivers/net/ethernet/intel/ixgb/ixgb_main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c index 247cf9219e03..c573655f3307 100644 --- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c +++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c | |||
@@ -101,8 +101,8 @@ static void ixgb_tx_timeout_task(struct work_struct *work); | |||
101 | 101 | ||
102 | static void ixgb_vlan_strip_enable(struct ixgb_adapter *adapter); | 102 | static void ixgb_vlan_strip_enable(struct ixgb_adapter *adapter); |
103 | static void ixgb_vlan_strip_disable(struct ixgb_adapter *adapter); | 103 | static void ixgb_vlan_strip_disable(struct ixgb_adapter *adapter); |
104 | static void ixgb_vlan_rx_add_vid(struct net_device *netdev, u16 vid); | 104 | static int ixgb_vlan_rx_add_vid(struct net_device *netdev, u16 vid); |
105 | static void ixgb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid); | 105 | static int ixgb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid); |
106 | static void ixgb_restore_vlan(struct ixgb_adapter *adapter); | 106 | static void ixgb_restore_vlan(struct ixgb_adapter *adapter); |
107 | 107 | ||
108 | #ifdef CONFIG_NET_POLL_CONTROLLER | 108 | #ifdef CONFIG_NET_POLL_CONTROLLER |
@@ -2217,7 +2217,7 @@ ixgb_vlan_strip_disable(struct ixgb_adapter *adapter) | |||
2217 | IXGB_WRITE_REG(&adapter->hw, CTRL0, ctrl); | 2217 | IXGB_WRITE_REG(&adapter->hw, CTRL0, ctrl); |
2218 | } | 2218 | } |
2219 | 2219 | ||
2220 | static void | 2220 | static int |
2221 | ixgb_vlan_rx_add_vid(struct net_device *netdev, u16 vid) | 2221 | ixgb_vlan_rx_add_vid(struct net_device *netdev, u16 vid) |
2222 | { | 2222 | { |
2223 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 2223 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
@@ -2230,9 +2230,11 @@ ixgb_vlan_rx_add_vid(struct net_device *netdev, u16 vid) | |||
2230 | vfta |= (1 << (vid & 0x1F)); | 2230 | vfta |= (1 << (vid & 0x1F)); |
2231 | ixgb_write_vfta(&adapter->hw, index, vfta); | 2231 | ixgb_write_vfta(&adapter->hw, index, vfta); |
2232 | set_bit(vid, adapter->active_vlans); | 2232 | set_bit(vid, adapter->active_vlans); |
2233 | |||
2234 | return 0; | ||
2233 | } | 2235 | } |
2234 | 2236 | ||
2235 | static void | 2237 | static int |
2236 | ixgb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | 2238 | ixgb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) |
2237 | { | 2239 | { |
2238 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 2240 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
@@ -2245,6 +2247,8 @@ ixgb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | |||
2245 | vfta &= ~(1 << (vid & 0x1F)); | 2247 | vfta &= ~(1 << (vid & 0x1F)); |
2246 | ixgb_write_vfta(&adapter->hw, index, vfta); | 2248 | ixgb_write_vfta(&adapter->hw, index, vfta); |
2247 | clear_bit(vid, adapter->active_vlans); | 2249 | clear_bit(vid, adapter->active_vlans); |
2250 | |||
2251 | return 0; | ||
2248 | } | 2252 | } |
2249 | 2253 | ||
2250 | static void | 2254 | static void |