diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-12-09 04:52:37 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-09 04:52:37 +0400 |
commit | 8e586137e6b63af1e881b328466ab5ffbe562510 (patch) | |
tree | da0767e1b1361aa24bd32f485453079e31854c0c /drivers/net/ethernet/emulex | |
parent | 7da82c06ded105bf601bfa0eafc92e84eb0ceeed (diff) | |
download | linux-8e586137e6b63af1e881b328466ab5ffbe562510.tar.xz |
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/emulex')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 3854fb0610ba..b8a526f9efc8 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -780,31 +780,35 @@ static int be_vid_config(struct be_adapter *adapter, bool vf, u32 vf_num) return status; } -static void be_vlan_add_vid(struct net_device *netdev, u16 vid) +static int be_vlan_add_vid(struct net_device *netdev, u16 vid) { struct be_adapter *adapter = netdev_priv(netdev); adapter->vlans_added++; if (!be_physfn(adapter)) - return; + return 0; adapter->vlan_tag[vid] = 1; if (adapter->vlans_added <= (adapter->max_vlans + 1)) be_vid_config(adapter, false, 0); + + return 0; } -static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) +static int be_vlan_rem_vid(struct net_device *netdev, u16 vid) { struct be_adapter *adapter = netdev_priv(netdev); adapter->vlans_added--; if (!be_physfn(adapter)) - return; + return 0; adapter->vlan_tag[vid] = 0; if (adapter->vlans_added <= adapter->max_vlans) be_vid_config(adapter, false, 0); + + return 0; } static void be_set_rx_mode(struct net_device *netdev) |