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/bonding | |
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/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 3216c514fdc8..d72c37f03e50 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -428,7 +428,7 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, | |||
428 | * @bond_dev: bonding net device that got called | 428 | * @bond_dev: bonding net device that got called |
429 | * @vid: vlan id being added | 429 | * @vid: vlan id being added |
430 | */ | 430 | */ |
431 | static void bond_vlan_rx_add_vid(struct net_device *bond_dev, uint16_t vid) | 431 | static int bond_vlan_rx_add_vid(struct net_device *bond_dev, uint16_t vid) |
432 | { | 432 | { |
433 | struct bonding *bond = netdev_priv(bond_dev); | 433 | struct bonding *bond = netdev_priv(bond_dev); |
434 | struct slave *slave; | 434 | struct slave *slave; |
@@ -448,7 +448,10 @@ static void bond_vlan_rx_add_vid(struct net_device *bond_dev, uint16_t vid) | |||
448 | if (res) { | 448 | if (res) { |
449 | pr_err("%s: Error: Failed to add vlan id %d\n", | 449 | pr_err("%s: Error: Failed to add vlan id %d\n", |
450 | bond_dev->name, vid); | 450 | bond_dev->name, vid); |
451 | return res; | ||
451 | } | 452 | } |
453 | |||
454 | return 0; | ||
452 | } | 455 | } |
453 | 456 | ||
454 | /** | 457 | /** |
@@ -456,7 +459,7 @@ static void bond_vlan_rx_add_vid(struct net_device *bond_dev, uint16_t vid) | |||
456 | * @bond_dev: bonding net device that got called | 459 | * @bond_dev: bonding net device that got called |
457 | * @vid: vlan id being removed | 460 | * @vid: vlan id being removed |
458 | */ | 461 | */ |
459 | static void bond_vlan_rx_kill_vid(struct net_device *bond_dev, uint16_t vid) | 462 | static int bond_vlan_rx_kill_vid(struct net_device *bond_dev, uint16_t vid) |
460 | { | 463 | { |
461 | struct bonding *bond = netdev_priv(bond_dev); | 464 | struct bonding *bond = netdev_priv(bond_dev); |
462 | struct slave *slave; | 465 | struct slave *slave; |
@@ -476,7 +479,10 @@ static void bond_vlan_rx_kill_vid(struct net_device *bond_dev, uint16_t vid) | |||
476 | if (res) { | 479 | if (res) { |
477 | pr_err("%s: Error: Failed to remove vlan id %d\n", | 480 | pr_err("%s: Error: Failed to remove vlan id %d\n", |
478 | bond_dev->name, vid); | 481 | bond_dev->name, vid); |
482 | return res; | ||
479 | } | 483 | } |
484 | |||
485 | return 0; | ||
480 | } | 486 | } |
481 | 487 | ||
482 | static void bond_add_vlans_on_slave(struct bonding *bond, struct net_device *slave_dev) | 488 | static void bond_add_vlans_on_slave(struct bonding *bond, struct net_device *slave_dev) |