aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bonding.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r--drivers/net/bonding/bonding.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 63e9cf779389..6b26962fd0ec 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -192,8 +192,9 @@ struct slave {
192 unsigned long last_arp_rx; 192 unsigned long last_arp_rx;
193 s8 link; /* one of BOND_LINK_XXXX */ 193 s8 link; /* one of BOND_LINK_XXXX */
194 s8 new_link; 194 s8 new_link;
195 u8 backup; /* indicates backup slave. Value corresponds with 195 u8 backup:1, /* indicates backup slave. Value corresponds with
196 BOND_STATE_ACTIVE and BOND_STATE_BACKUP */ 196 BOND_STATE_ACTIVE and BOND_STATE_BACKUP */
197 inactive:1; /* indicates inactive slave */
197 u32 original_mtu; 198 u32 original_mtu;
198 u32 link_failure_count; 199 u32 link_failure_count;
199 u8 perm_hwaddr[ETH_ALEN]; 200 u8 perm_hwaddr[ETH_ALEN];
@@ -376,13 +377,18 @@ static inline void bond_set_slave_inactive_flags(struct slave *slave)
376 if (!bond_is_lb(bond)) 377 if (!bond_is_lb(bond))
377 bond_set_backup_slave(slave); 378 bond_set_backup_slave(slave);
378 if (!bond->params.all_slaves_active) 379 if (!bond->params.all_slaves_active)
379 slave->dev->priv_flags |= IFF_SLAVE_INACTIVE; 380 slave->inactive = 1;
380} 381}
381 382
382static inline void bond_set_slave_active_flags(struct slave *slave) 383static inline void bond_set_slave_active_flags(struct slave *slave)
383{ 384{
384 bond_set_active_slave(slave); 385 bond_set_active_slave(slave);
385 slave->dev->priv_flags &= ~IFF_SLAVE_INACTIVE; 386 slave->inactive = 0;
387}
388
389static inline bool bond_is_slave_inactive(struct slave *slave)
390{
391 return slave->inactive;
386} 392}
387 393
388struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); 394struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);