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/adaptec | |
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/adaptec')
-rw-r--r-- | drivers/net/ethernet/adaptec/starfire.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/adaptec/starfire.c b/drivers/net/ethernet/adaptec/starfire.c index a446e251908b..cb4f38a17f20 100644 --- a/drivers/net/ethernet/adaptec/starfire.c +++ b/drivers/net/ethernet/adaptec/starfire.c | |||
@@ -607,7 +607,7 @@ static const struct ethtool_ops ethtool_ops; | |||
607 | 607 | ||
608 | 608 | ||
609 | #ifdef VLAN_SUPPORT | 609 | #ifdef VLAN_SUPPORT |
610 | static void netdev_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) | 610 | static int netdev_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) |
611 | { | 611 | { |
612 | struct netdev_private *np = netdev_priv(dev); | 612 | struct netdev_private *np = netdev_priv(dev); |
613 | 613 | ||
@@ -617,9 +617,11 @@ static void netdev_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) | |||
617 | set_bit(vid, np->active_vlans); | 617 | set_bit(vid, np->active_vlans); |
618 | set_rx_mode(dev); | 618 | set_rx_mode(dev); |
619 | spin_unlock(&np->lock); | 619 | spin_unlock(&np->lock); |
620 | |||
621 | return 0; | ||
620 | } | 622 | } |
621 | 623 | ||
622 | static void netdev_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | 624 | static int netdev_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) |
623 | { | 625 | { |
624 | struct netdev_private *np = netdev_priv(dev); | 626 | struct netdev_private *np = netdev_priv(dev); |
625 | 627 | ||
@@ -629,6 +631,8 @@ static void netdev_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | |||
629 | clear_bit(vid, np->active_vlans); | 631 | clear_bit(vid, np->active_vlans); |
630 | set_rx_mode(dev); | 632 | set_rx_mode(dev); |
631 | spin_unlock(&np->lock); | 633 | spin_unlock(&np->lock); |
634 | |||
635 | return 0; | ||
632 | } | 636 | } |
633 | #endif /* VLAN_SUPPORT */ | 637 | #endif /* VLAN_SUPPORT */ |
634 | 638 | ||