diff options
| -rw-r--r-- | drivers/net/bonding/bond_alb.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index e7a460096b51..a21286088821 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
| @@ -1627,9 +1627,8 @@ void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char | |||
| 1627 | 1627 | ||
| 1628 | if (link == BOND_LINK_DOWN) { | 1628 | if (link == BOND_LINK_DOWN) { |
| 1629 | tlb_clear_slave(bond, slave, 0); | 1629 | tlb_clear_slave(bond, slave, 0); |
| 1630 | if (bond->alb_info.rlb_enabled) { | 1630 | if (bond->alb_info.rlb_enabled) |
| 1631 | rlb_clear_slave(bond, slave); | 1631 | rlb_clear_slave(bond, slave); |
| 1632 | } | ||
| 1633 | } else if (link == BOND_LINK_UP) { | 1632 | } else if (link == BOND_LINK_UP) { |
| 1634 | /* order a rebalance ASAP */ | 1633 | /* order a rebalance ASAP */ |
| 1635 | bond_info->tx_rebalance_counter = BOND_TLB_REBALANCE_TICKS; | 1634 | bond_info->tx_rebalance_counter = BOND_TLB_REBALANCE_TICKS; |
| @@ -1741,14 +1740,12 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr) | |||
| 1741 | struct slave *swap_slave; | 1740 | struct slave *swap_slave; |
| 1742 | int res; | 1741 | int res; |
| 1743 | 1742 | ||
| 1744 | if (!is_valid_ether_addr(sa->sa_data)) { | 1743 | if (!is_valid_ether_addr(sa->sa_data)) |
| 1745 | return -EADDRNOTAVAIL; | 1744 | return -EADDRNOTAVAIL; |
| 1746 | } | ||
| 1747 | 1745 | ||
| 1748 | res = alb_set_mac_address(bond, addr); | 1746 | res = alb_set_mac_address(bond, addr); |
| 1749 | if (res) { | 1747 | if (res) |
| 1750 | return res; | 1748 | return res; |
| 1751 | } | ||
| 1752 | 1749 | ||
| 1753 | memcpy(bond_dev->dev_addr, sa->sa_data, bond_dev->addr_len); | 1750 | memcpy(bond_dev->dev_addr, sa->sa_data, bond_dev->addr_len); |
| 1754 | 1751 | ||
| @@ -1756,9 +1753,8 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr) | |||
| 1756 | * Otherwise we'll need to pass the new address to it and handle | 1753 | * Otherwise we'll need to pass the new address to it and handle |
| 1757 | * duplications. | 1754 | * duplications. |
| 1758 | */ | 1755 | */ |
| 1759 | if (!bond->curr_active_slave) { | 1756 | if (!bond->curr_active_slave) |
| 1760 | return 0; | 1757 | return 0; |
| 1761 | } | ||
| 1762 | 1758 | ||
| 1763 | swap_slave = bond_slave_has_mac(bond, bond_dev->dev_addr); | 1759 | swap_slave = bond_slave_has_mac(bond, bond_dev->dev_addr); |
| 1764 | 1760 | ||
| @@ -1782,8 +1778,7 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr) | |||
| 1782 | 1778 | ||
| 1783 | void bond_alb_clear_vlan(struct bonding *bond, unsigned short vlan_id) | 1779 | void bond_alb_clear_vlan(struct bonding *bond, unsigned short vlan_id) |
| 1784 | { | 1780 | { |
| 1785 | if (bond->alb_info.rlb_enabled) { | 1781 | if (bond->alb_info.rlb_enabled) |
| 1786 | rlb_clear_vlan(bond, vlan_id); | 1782 | rlb_clear_vlan(bond, vlan_id); |
| 1787 | } | ||
| 1788 | } | 1783 | } |
| 1789 | 1784 | ||
