mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-06 06:24:47 +00:00
bonding: use bond_is_lb() when it's appropriate
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f22a563b0a
commit
ae63e808f5
2 changed files with 2 additions and 4 deletions
|
@ -2405,8 +2405,7 @@ static void bond_miimon_commit(struct bonding *bond)
|
||||||
bond_3ad_handle_link_change(slave,
|
bond_3ad_handle_link_change(slave,
|
||||||
BOND_LINK_DOWN);
|
BOND_LINK_DOWN);
|
||||||
|
|
||||||
if (bond->params.mode == BOND_MODE_TLB ||
|
if (bond_is_lb(bond))
|
||||||
bond->params.mode == BOND_MODE_ALB)
|
|
||||||
bond_alb_handle_link_change(bond, slave,
|
bond_alb_handle_link_change(bond, slave,
|
||||||
BOND_LINK_DOWN);
|
BOND_LINK_DOWN);
|
||||||
|
|
||||||
|
|
|
@ -286,8 +286,7 @@ static inline unsigned long slave_last_rx(struct bonding *bond,
|
||||||
static inline void bond_set_slave_inactive_flags(struct slave *slave)
|
static inline void bond_set_slave_inactive_flags(struct slave *slave)
|
||||||
{
|
{
|
||||||
struct bonding *bond = netdev_priv(slave->dev->master);
|
struct bonding *bond = netdev_priv(slave->dev->master);
|
||||||
if (bond->params.mode != BOND_MODE_TLB &&
|
if (!bond_is_lb(bond))
|
||||||
bond->params.mode != BOND_MODE_ALB)
|
|
||||||
slave->state = BOND_STATE_BACKUP;
|
slave->state = BOND_STATE_BACKUP;
|
||||||
slave->dev->priv_flags |= IFF_SLAVE_INACTIVE;
|
slave->dev->priv_flags |= IFF_SLAVE_INACTIVE;
|
||||||
if (slave_do_arp_validate(bond, slave))
|
if (slave_do_arp_validate(bond, slave))
|
||||||
|
|
Loading…
Add table
Reference in a new issue