diff options
author | Holger Eitzenberger <holger@eitzenberger.org> | 2008-12-17 22:13:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-17 22:13:07 -0500 |
commit | ce6a49ad401d78ff1f66e2a55cf445d0f45d8146 (patch) | |
tree | 0dfb2babfe955768ad0f500a1d5c512718a3e922 /drivers/net/bonding/bond_3ad.c | |
parent | a6ae186b9a950f4d0467cb9c3661965f442176de (diff) |
bonding: use port_params in __update_selected()
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index f27f62711eb4..4792e12a7f2c 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -513,16 +513,16 @@ static void __record_default(struct port *port) | |||
513 | */ | 513 | */ |
514 | static void __update_selected(struct lacpdu *lacpdu, struct port *port) | 514 | static void __update_selected(struct lacpdu *lacpdu, struct port *port) |
515 | { | 515 | { |
516 | // validate lacpdu and port | ||
517 | if (lacpdu && port) { | 516 | if (lacpdu && port) { |
517 | const struct port_params *partner = &port->partner_oper; | ||
518 | |||
518 | // check if any parameter is different | 519 | // check if any parameter is different |
519 | if ((ntohs(lacpdu->actor_port) != port->partner_oper.port_number) || | 520 | if (ntohs(lacpdu->actor_port) != partner->port_number |
520 | (ntohs(lacpdu->actor_port_priority) != port->partner_oper.port_priority) || | 521 | || ntohs(lacpdu->actor_port_priority) != partner->port_priority |
521 | MAC_ADDRESS_COMPARE(&(lacpdu->actor_system), &(port->partner_oper.system)) || | 522 | || MAC_ADDRESS_COMPARE(&lacpdu->actor_system, &partner->system) |
522 | (ntohs(lacpdu->actor_system_priority) != port->partner_oper.system_priority) || | 523 | || ntohs(lacpdu->actor_system_priority) != partner->system_priority |
523 | (ntohs(lacpdu->actor_key) != port->partner_oper.key) || | 524 | || ntohs(lacpdu->actor_key) != partner->key |
524 | ((lacpdu->actor_state & AD_STATE_AGGREGATION) != (port->partner_oper.port_state & AD_STATE_AGGREGATION)) | 525 | || (lacpdu->actor_state & AD_STATE_AGGREGATION) != (partner->port_state & AD_STATE_AGGREGATION)) { |
525 | ) { | ||
526 | // update the state machine Selected variable | 526 | // update the state machine Selected variable |
527 | port->sm_vars &= ~AD_PORT_SELECTED; | 527 | port->sm_vars &= ~AD_PORT_SELECTED; |
528 | } | 528 | } |