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:

committed by
David S. Miller

parent
7da82c06de
commit
8e586137e6
@@ -1869,15 +1869,15 @@ static void qeth_l3_free_vlan_addresses(struct qeth_card *card,
|
||||
qeth_l3_free_vlan_addresses6(card, vid);
|
||||
}
|
||||
|
||||
static void qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
|
||||
static int qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
|
||||
{
|
||||
struct qeth_card *card = dev->ml_priv;
|
||||
|
||||
set_bit(vid, card->active_vlans);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
|
||||
static int qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
|
||||
{
|
||||
struct qeth_card *card = dev->ml_priv;
|
||||
unsigned long flags;
|
||||
@@ -1885,7 +1885,7 @@ static void qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
|
||||
QETH_CARD_TEXT_(card, 4, "kid:%d", vid);
|
||||
if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) {
|
||||
QETH_CARD_TEXT(card, 3, "kidREC");
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
spin_lock_irqsave(&card->vlanlock, flags);
|
||||
/* unregister IP addresses of vlan device */
|
||||
@@ -1893,6 +1893,7 @@ static void qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
|
||||
clear_bit(vid, card->active_vlans);
|
||||
spin_unlock_irqrestore(&card->vlanlock, flags);
|
||||
qeth_l3_set_multicast_list(card->dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int qeth_l3_rebuild_skb(struct qeth_card *card,
|
||||
|
Reference in New Issue
Block a user