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/cisco | |
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/cisco')
-rw-r--r-- | drivers/net/ethernet/cisco/enic/enic_dev.c | 14 | ||||
-rw-r--r-- | drivers/net/ethernet/cisco/enic/enic_dev.h | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic_dev.c b/drivers/net/ethernet/cisco/enic/enic_dev.c index fd6247b3c0e..bf0fc56dba1 100644 --- a/drivers/net/ethernet/cisco/enic/enic_dev.c +++ b/drivers/net/ethernet/cisco/enic/enic_dev.c | |||
@@ -212,23 +212,29 @@ int enic_dev_deinit_done(struct enic *enic, int *status) | |||
212 | } | 212 | } |
213 | 213 | ||
214 | /* rtnl lock is held */ | 214 | /* rtnl lock is held */ |
215 | void enic_vlan_rx_add_vid(struct net_device *netdev, u16 vid) | 215 | int enic_vlan_rx_add_vid(struct net_device *netdev, u16 vid) |
216 | { | 216 | { |
217 | struct enic *enic = netdev_priv(netdev); | 217 | struct enic *enic = netdev_priv(netdev); |
218 | int err; | ||
218 | 219 | ||
219 | spin_lock(&enic->devcmd_lock); | 220 | spin_lock(&enic->devcmd_lock); |
220 | enic_add_vlan(enic, vid); | 221 | err = enic_add_vlan(enic, vid); |
221 | spin_unlock(&enic->devcmd_lock); | 222 | spin_unlock(&enic->devcmd_lock); |
223 | |||
224 | return err; | ||
222 | } | 225 | } |
223 | 226 | ||
224 | /* rtnl lock is held */ | 227 | /* rtnl lock is held */ |
225 | void enic_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) | 228 | int enic_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) |
226 | { | 229 | { |
227 | struct enic *enic = netdev_priv(netdev); | 230 | struct enic *enic = netdev_priv(netdev); |
231 | int err; | ||
228 | 232 | ||
229 | spin_lock(&enic->devcmd_lock); | 233 | spin_lock(&enic->devcmd_lock); |
230 | enic_del_vlan(enic, vid); | 234 | err = enic_del_vlan(enic, vid); |
231 | spin_unlock(&enic->devcmd_lock); | 235 | spin_unlock(&enic->devcmd_lock); |
236 | |||
237 | return err; | ||
232 | } | 238 | } |
233 | 239 | ||
234 | int enic_dev_enable2(struct enic *enic, int active) | 240 | int enic_dev_enable2(struct enic *enic, int active) |
diff --git a/drivers/net/ethernet/cisco/enic/enic_dev.h b/drivers/net/ethernet/cisco/enic/enic_dev.h index 1f83a4747ba..da1cba3c410 100644 --- a/drivers/net/ethernet/cisco/enic/enic_dev.h +++ b/drivers/net/ethernet/cisco/enic/enic_dev.h | |||
@@ -46,8 +46,8 @@ int enic_dev_packet_filter(struct enic *enic, int directed, int multicast, | |||
46 | int broadcast, int promisc, int allmulti); | 46 | int broadcast, int promisc, int allmulti); |
47 | int enic_dev_add_addr(struct enic *enic, u8 *addr); | 47 | int enic_dev_add_addr(struct enic *enic, u8 *addr); |
48 | int enic_dev_del_addr(struct enic *enic, u8 *addr); | 48 | int enic_dev_del_addr(struct enic *enic, u8 *addr); |
49 | void enic_vlan_rx_add_vid(struct net_device *netdev, u16 vid); | 49 | int enic_vlan_rx_add_vid(struct net_device *netdev, u16 vid); |
50 | void enic_vlan_rx_kill_vid(struct net_device *netdev, u16 vid); | 50 | int enic_vlan_rx_kill_vid(struct net_device *netdev, u16 vid); |
51 | int enic_dev_notify_unset(struct enic *enic); | 51 | int enic_dev_notify_unset(struct enic *enic); |
52 | int enic_dev_hang_notify(struct enic *enic); | 52 | int enic_dev_hang_notify(struct enic *enic); |
53 | int enic_dev_set_ig_vlan_rewrite_mode(struct enic *enic); | 53 | int enic_dev_set_ig_vlan_rewrite_mode(struct enic *enic); |