Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122766
b: refs/heads/master
c: b99d6ba
h: refs/heads/master
v: v3
  • Loading branch information
Holger Eitzenberger authored and David S. Miller committed Dec 18, 2008
1 parent 46694a1 commit e842634
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1055c9aba3b6850245fe3bbb533d4747e7f904bf
refs/heads/master: b99d6ba96d814dab06671029948f22995d603d7b
19 changes: 10 additions & 9 deletions trunk/drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,24 +483,25 @@ static u16 __ad_timer_to_ticks(u16 timer_type, u16 par)
*/
static void __record_pdu(struct lacpdu *lacpdu, struct port *port)
{
// validate lacpdu and port
if (lacpdu && port) {
struct port_params *partner = &port->partner_oper;

// record the new parameter values for the partner operational
port->partner_oper.port_number = ntohs(lacpdu->actor_port);
port->partner_oper.port_priority = ntohs(lacpdu->actor_port_priority);
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);
port->partner_oper.port_state = lacpdu->actor_state;
partner->port_number = ntohs(lacpdu->actor_port);
partner->port_priority = ntohs(lacpdu->actor_port_priority);
partner->system = lacpdu->actor_system;
partner->system_priority = ntohs(lacpdu->actor_system_priority);
partner->key = ntohs(lacpdu->actor_key);
partner->port_state = lacpdu->actor_state;

// set actor_oper_port_state.defaulted to FALSE
port->actor_oper_port_state &= ~AD_STATE_DEFAULTED;

// set the partner sync. to on if the partner is sync. and the port is matched
if ((port->sm_vars & AD_PORT_MATCHED) && (lacpdu->actor_state & AD_STATE_SYNCHRONIZATION)) {
port->partner_oper.port_state |= AD_STATE_SYNCHRONIZATION;
partner->port_state |= AD_STATE_SYNCHRONIZATION;
} else {
port->partner_oper.port_state &= ~AD_STATE_SYNCHRONIZATION;
partner->port_state &= ~AD_STATE_SYNCHRONIZATION;
}
}
}
Expand Down

0 comments on commit e842634

Please sign in to comment.