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/team | |
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/team')
-rw-r--r-- | drivers/net/team/team.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 064155d56bce..8e8bf958539e 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -902,7 +902,7 @@ team_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) | |||
902 | return stats; | 902 | return stats; |
903 | } | 903 | } |
904 | 904 | ||
905 | static void team_vlan_rx_add_vid(struct net_device *dev, uint16_t vid) | 905 | static int team_vlan_rx_add_vid(struct net_device *dev, uint16_t vid) |
906 | { | 906 | { |
907 | struct team *team = netdev_priv(dev); | 907 | struct team *team = netdev_priv(dev); |
908 | struct team_port *port; | 908 | struct team_port *port; |
@@ -915,9 +915,11 @@ static void team_vlan_rx_add_vid(struct net_device *dev, uint16_t vid) | |||
915 | ops->ndo_vlan_rx_add_vid(port->dev, vid); | 915 | ops->ndo_vlan_rx_add_vid(port->dev, vid); |
916 | } | 916 | } |
917 | rcu_read_unlock(); | 917 | rcu_read_unlock(); |
918 | |||
919 | return 0; | ||
918 | } | 920 | } |
919 | 921 | ||
920 | static void team_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid) | 922 | static int team_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid) |
921 | { | 923 | { |
922 | struct team *team = netdev_priv(dev); | 924 | struct team *team = netdev_priv(dev); |
923 | struct team_port *port; | 925 | struct team_port *port; |
@@ -930,6 +932,8 @@ static void team_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid) | |||
930 | ops->ndo_vlan_rx_kill_vid(port->dev, vid); | 932 | ops->ndo_vlan_rx_kill_vid(port->dev, vid); |
931 | } | 933 | } |
932 | rcu_read_unlock(); | 934 | rcu_read_unlock(); |
935 | |||
936 | return 0; | ||
933 | } | 937 | } |
934 | 938 | ||
935 | static int team_add_slave(struct net_device *dev, struct net_device *port_dev) | 939 | static int team_add_slave(struct net_device *dev, struct net_device *port_dev) |