diff options
author | Veaceslav Falico <vfalico@gmail.com> | 2014-05-15 15:39:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-16 16:34:32 -0400 |
commit | 01844098ecd9564cd5f903e3ff6c1ea96355772d (patch) | |
tree | 4bf2bb8089248698ec1380d8c4e9cd018141466f /drivers/net/bonding/bond_alb.c | |
parent | ec0865a94991d1819d4f99866a2492af8df5c882 (diff) |
bonding: create a macro for bond mode and use it
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_alb.c')
-rw-r--r-- | drivers/net/bonding/bond_alb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index 70de039dad2e..efacb0e98ed7 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c | |||
@@ -1057,7 +1057,7 @@ static int alb_set_slave_mac_addr(struct slave *slave, u8 addr[]) | |||
1057 | struct net_device *dev = slave->dev; | 1057 | struct net_device *dev = slave->dev; |
1058 | struct sockaddr s_addr; | 1058 | struct sockaddr s_addr; |
1059 | 1059 | ||
1060 | if (slave->bond->params.mode == BOND_MODE_TLB) { | 1060 | if (BOND_MODE(slave->bond) == BOND_MODE_TLB) { |
1061 | memcpy(dev->dev_addr, addr, dev->addr_len); | 1061 | memcpy(dev->dev_addr, addr, dev->addr_len); |
1062 | return 0; | 1062 | return 0; |
1063 | } | 1063 | } |
@@ -1745,7 +1745,7 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave | |||
1745 | /* in TLB mode, the slave might flip down/up with the old dev_addr, | 1745 | /* in TLB mode, the slave might flip down/up with the old dev_addr, |
1746 | * and thus filter bond->dev_addr's packets, so force bond's mac | 1746 | * and thus filter bond->dev_addr's packets, so force bond's mac |
1747 | */ | 1747 | */ |
1748 | if (bond->params.mode == BOND_MODE_TLB) { | 1748 | if (BOND_MODE(bond) == BOND_MODE_TLB) { |
1749 | struct sockaddr sa; | 1749 | struct sockaddr sa; |
1750 | u8 tmp_addr[ETH_ALEN]; | 1750 | u8 tmp_addr[ETH_ALEN]; |
1751 | 1751 | ||