diff options
Diffstat (limited to 'drivers/net/bonding/bonding.h')
| -rw-r--r-- | drivers/net/bonding/bonding.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 3dd78d048c3e..ce9dc9b4e2dc 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
| @@ -22,8 +22,8 @@ | |||
| 22 | #include "bond_3ad.h" | 22 | #include "bond_3ad.h" |
| 23 | #include "bond_alb.h" | 23 | #include "bond_alb.h" |
| 24 | 24 | ||
| 25 | #define DRV_VERSION "3.0.1" | 25 | #define DRV_VERSION "3.0.2" |
| 26 | #define DRV_RELDATE "January 9, 2006" | 26 | #define DRV_RELDATE "February 21, 2006" |
| 27 | #define DRV_NAME "bonding" | 27 | #define DRV_NAME "bonding" |
| 28 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" | 28 | #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" |
| 29 | 29 | ||
| @@ -230,14 +230,37 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave) | |||
| 230 | 230 | ||
| 231 | static inline void bond_set_slave_inactive_flags(struct slave *slave) | 231 | static inline void bond_set_slave_inactive_flags(struct slave *slave) |
| 232 | { | 232 | { |
| 233 | slave->state = BOND_STATE_BACKUP; | 233 | struct bonding *bond = slave->dev->master->priv; |
| 234 | slave->dev->flags |= IFF_NOARP; | 234 | if (bond->params.mode != BOND_MODE_TLB && |
| 235 | bond->params.mode != BOND_MODE_ALB) | ||
| 236 | slave->state = BOND_STATE_BACKUP; | ||
| 237 | slave->dev->priv_flags |= IFF_SLAVE_INACTIVE; | ||
| 235 | } | 238 | } |
| 236 | 239 | ||
| 237 | static inline void bond_set_slave_active_flags(struct slave *slave) | 240 | static inline void bond_set_slave_active_flags(struct slave *slave) |
| 238 | { | 241 | { |
| 239 | slave->state = BOND_STATE_ACTIVE; | 242 | slave->state = BOND_STATE_ACTIVE; |
| 240 | slave->dev->flags &= ~IFF_NOARP; | 243 | slave->dev->priv_flags &= ~IFF_SLAVE_INACTIVE; |
| 244 | } | ||
| 245 | |||
| 246 | static inline void bond_set_master_3ad_flags(struct bonding *bond) | ||
| 247 | { | ||
| 248 | bond->dev->priv_flags |= IFF_MASTER_8023AD; | ||
| 249 | } | ||
| 250 | |||
| 251 | static inline void bond_unset_master_3ad_flags(struct bonding *bond) | ||
| 252 | { | ||
| 253 | bond->dev->priv_flags &= ~IFF_MASTER_8023AD; | ||
| 254 | } | ||
| 255 | |||
| 256 | static inline void bond_set_master_alb_flags(struct bonding *bond) | ||
| 257 | { | ||
| 258 | bond->dev->priv_flags |= IFF_MASTER_ALB; | ||
| 259 | } | ||
| 260 | |||
| 261 | static inline void bond_unset_master_alb_flags(struct bonding *bond) | ||
| 262 | { | ||
| 263 | bond->dev->priv_flags &= ~IFF_MASTER_ALB; | ||
| 241 | } | 264 | } |
| 242 | 265 | ||
| 243 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); | 266 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); |
