Commit aa312819 authored by Holger Eitzenberger's avatar Holger Eitzenberger Committed by David S. Miller

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: default avatarHolger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 42199884
...@@ -491,16 +491,7 @@ static void __record_pdu(struct lacpdu *lacpdu, struct port *port) ...@@ -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 = lacpdu->actor_system;
port->partner_oper_system_priority = ntohs(lacpdu->actor_system_priority); port->partner_oper_system_priority = ntohs(lacpdu->actor_system_priority);
port->partner_oper_key = ntohs(lacpdu->actor_key); port->partner_oper_key = ntohs(lacpdu->actor_key);
// zero partener's lase states port->partner_oper_port_state = lacpdu->actor_state;
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);
// set actor_oper_port_state.defaulted to FALSE // set actor_oper_port_state.defaulted to FALSE
port->actor_oper_port_state &= ~AD_STATE_DEFAULTED; port->actor_oper_port_state &= ~AD_STATE_DEFAULTED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment