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>
This commit is contained in:
@@ -212,23 +212,29 @@ int enic_dev_deinit_done(struct enic *enic, int *status)
|
||||
}
|
||||
|
||||
/* rtnl lock is held */
|
||||
void enic_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
|
||||
int enic_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
|
||||
{
|
||||
struct enic *enic = netdev_priv(netdev);
|
||||
int err;
|
||||
|
||||
spin_lock(&enic->devcmd_lock);
|
||||
enic_add_vlan(enic, vid);
|
||||
err = enic_add_vlan(enic, vid);
|
||||
spin_unlock(&enic->devcmd_lock);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/* rtnl lock is held */
|
||||
void enic_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
|
||||
int enic_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
|
||||
{
|
||||
struct enic *enic = netdev_priv(netdev);
|
||||
int err;
|
||||
|
||||
spin_lock(&enic->devcmd_lock);
|
||||
enic_del_vlan(enic, vid);
|
||||
err = enic_del_vlan(enic, vid);
|
||||
spin_unlock(&enic->devcmd_lock);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int enic_dev_enable2(struct enic *enic, int active)
|
||||
|
@@ -46,8 +46,8 @@ int enic_dev_packet_filter(struct enic *enic, int directed, int multicast,
|
||||
int broadcast, int promisc, int allmulti);
|
||||
int enic_dev_add_addr(struct enic *enic, u8 *addr);
|
||||
int enic_dev_del_addr(struct enic *enic, u8 *addr);
|
||||
void enic_vlan_rx_add_vid(struct net_device *netdev, u16 vid);
|
||||
void enic_vlan_rx_kill_vid(struct net_device *netdev, u16 vid);
|
||||
int enic_vlan_rx_add_vid(struct net_device *netdev, u16 vid);
|
||||
int enic_vlan_rx_kill_vid(struct net_device *netdev, u16 vid);
|
||||
int enic_dev_notify_unset(struct enic *enic);
|
||||
int enic_dev_hang_notify(struct enic *enic);
|
||||
int enic_dev_set_ig_vlan_rewrite_mode(struct enic *enic);
|
||||
|
Reference in New Issue
Block a user