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/s390/net/qeth_l3_main.c | |
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/s390/net/qeth_l3_main.c')
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index b2a55e3fde0b..b3b045c21e2c 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -1869,15 +1869,15 @@ static void qeth_l3_free_vlan_addresses(struct qeth_card *card, | |||
1869 | qeth_l3_free_vlan_addresses6(card, vid); | 1869 | qeth_l3_free_vlan_addresses6(card, vid); |
1870 | } | 1870 | } |
1871 | 1871 | ||
1872 | static void qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) | 1872 | static int qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) |
1873 | { | 1873 | { |
1874 | struct qeth_card *card = dev->ml_priv; | 1874 | struct qeth_card *card = dev->ml_priv; |
1875 | 1875 | ||
1876 | set_bit(vid, card->active_vlans); | 1876 | set_bit(vid, card->active_vlans); |
1877 | return; | 1877 | return 0; |
1878 | } | 1878 | } |
1879 | 1879 | ||
1880 | static void qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | 1880 | static int qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) |
1881 | { | 1881 | { |
1882 | struct qeth_card *card = dev->ml_priv; | 1882 | struct qeth_card *card = dev->ml_priv; |
1883 | unsigned long flags; | 1883 | unsigned long flags; |
@@ -1885,7 +1885,7 @@ static void qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | |||
1885 | QETH_CARD_TEXT_(card, 4, "kid:%d", vid); | 1885 | QETH_CARD_TEXT_(card, 4, "kid:%d", vid); |
1886 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { | 1886 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { |
1887 | QETH_CARD_TEXT(card, 3, "kidREC"); | 1887 | QETH_CARD_TEXT(card, 3, "kidREC"); |
1888 | return; | 1888 | return 0; |
1889 | } | 1889 | } |
1890 | spin_lock_irqsave(&card->vlanlock, flags); | 1890 | spin_lock_irqsave(&card->vlanlock, flags); |
1891 | /* unregister IP addresses of vlan device */ | 1891 | /* 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) | |||
1893 | clear_bit(vid, card->active_vlans); | 1893 | clear_bit(vid, card->active_vlans); |
1894 | spin_unlock_irqrestore(&card->vlanlock, flags); | 1894 | spin_unlock_irqrestore(&card->vlanlock, flags); |
1895 | qeth_l3_set_multicast_list(card->dev); | 1895 | qeth_l3_set_multicast_list(card->dev); |
1896 | return 0; | ||
1896 | } | 1897 | } |
1897 | 1898 | ||
1898 | static inline int qeth_l3_rebuild_skb(struct qeth_card *card, | 1899 | static inline int qeth_l3_rebuild_skb(struct qeth_card *card, |