diff options
author | Holger Eitzenberger <holger@eitzenberger.org> | 2008-12-18 03:07:16 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-18 03:07:16 (GMT) |
commit | aa3128199dbe07b5be3382de590c59216f91d3e3 (patch) | |
tree | e6fcee846c78072a45711edd57af53412603ea17 /drivers/net | |
parent | 42199884594bc336c9185441cbed99a9324dab34 (diff) | |
download | linux-fsl-qoriq-aa3128199dbe07b5be3382de590c59216f91d3e3.tar.xz |
bonding: improve elaborate port_state assignment
The previous code was just a funny way of assigning both values (they
are both of type u8).
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 6f3655d..7a108fa 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -491,16 +491,7 @@ static void __record_pdu(struct lacpdu *lacpdu, struct port *port) port->partner_oper_system = lacpdu->actor_system; port->partner_oper_system_priority = ntohs(lacpdu->actor_system_priority); port->partner_oper_key = ntohs(lacpdu->actor_key); - // zero partener's lase states - port->partner_oper_port_state = 0; - port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_LACP_ACTIVITY); - port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_LACP_TIMEOUT); - port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_AGGREGATION); - port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_SYNCHRONIZATION); - port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_COLLECTING); - port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_DISTRIBUTING); - port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_DEFAULTED); - port->partner_oper_port_state |= (lacpdu->actor_state & AD_STATE_EXPIRED); + port->partner_oper_port_state = lacpdu->actor_state; // set actor_oper_port_state.defaulted to FALSE port->actor_oper_port_state &= ~AD_STATE_DEFAULTED; |