aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bonding/bond_3ad.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 4792e12a7f2c..dc13450d1e08 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -543,16 +543,18 @@ static void __update_selected(struct lacpdu *lacpdu, struct port *port)
543 */ 543 */
544static void __update_default_selected(struct port *port) 544static void __update_default_selected(struct port *port)
545{ 545{
546 // validate the port
547 if (port) { 546 if (port) {
547 const struct port_params *admin = &port->partner_admin;
548 const struct port_params *oper = &port->partner_oper;
549
548 // check if any parameter is different 550 // check if any parameter is different
549 if ((port->partner_admin.port_number != port->partner_oper.port_number) || 551 if (admin->port_number != oper->port_number
550 (port->partner_admin.port_priority != port->partner_oper.port_priority) || 552 || admin->port_priority != oper->port_priority
551 MAC_ADDRESS_COMPARE(&(port->partner_admin.system), &(port->partner_oper.system)) || 553 || MAC_ADDRESS_COMPARE(&admin->system, &oper->system)
552 (port->partner_admin.system_priority != port->partner_oper.system_priority) || 554 || admin->system_priority != oper->system_priority
553 (port->partner_admin.key != port->partner_oper.key) || 555 || admin->key != oper->key
554 ((port->partner_admin.port_state & AD_STATE_AGGREGATION) != (port->partner_oper.port_state & AD_STATE_AGGREGATION)) 556 || (admin->port_state & AD_STATE_AGGREGATION)
555 ) { 557 != (oper->port_state & AD_STATE_AGGREGATION)) {
556 // update the state machine Selected variable 558 // update the state machine Selected variable
557 port->sm_vars &= ~AD_PORT_SELECTED; 559 port->sm_vars &= ~AD_PORT_SELECTED;
558 } 560 }