diff options
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index d02e852afbd9..b789dcb77626 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -483,24 +483,25 @@ static u16 __ad_timer_to_ticks(u16 timer_type, u16 par) | |||
483 | */ | 483 | */ |
484 | static void __record_pdu(struct lacpdu *lacpdu, struct port *port) | 484 | static void __record_pdu(struct lacpdu *lacpdu, struct port *port) |
485 | { | 485 | { |
486 | // validate lacpdu and port | ||
487 | if (lacpdu && port) { | 486 | if (lacpdu && port) { |
487 | struct port_params *partner = &port->partner_oper; | ||
488 | |||
488 | // record the new parameter values for the partner operational | 489 | // record the new parameter values for the partner operational |
489 | port->partner_oper.port_number = ntohs(lacpdu->actor_port); | 490 | partner->port_number = ntohs(lacpdu->actor_port); |
490 | port->partner_oper.port_priority = ntohs(lacpdu->actor_port_priority); | 491 | partner->port_priority = ntohs(lacpdu->actor_port_priority); |
491 | port->partner_oper.system = lacpdu->actor_system; | 492 | partner->system = lacpdu->actor_system; |
492 | port->partner_oper.system_priority = ntohs(lacpdu->actor_system_priority); | 493 | partner->system_priority = ntohs(lacpdu->actor_system_priority); |
493 | port->partner_oper.key = ntohs(lacpdu->actor_key); | 494 | partner->key = ntohs(lacpdu->actor_key); |
494 | port->partner_oper.port_state = lacpdu->actor_state; | 495 | partner->port_state = lacpdu->actor_state; |
495 | 496 | ||
496 | // set actor_oper_port_state.defaulted to FALSE | 497 | // set actor_oper_port_state.defaulted to FALSE |
497 | port->actor_oper_port_state &= ~AD_STATE_DEFAULTED; | 498 | port->actor_oper_port_state &= ~AD_STATE_DEFAULTED; |
498 | 499 | ||
499 | // set the partner sync. to on if the partner is sync. and the port is matched | 500 | // set the partner sync. to on if the partner is sync. and the port is matched |
500 | if ((port->sm_vars & AD_PORT_MATCHED) && (lacpdu->actor_state & AD_STATE_SYNCHRONIZATION)) { | 501 | if ((port->sm_vars & AD_PORT_MATCHED) && (lacpdu->actor_state & AD_STATE_SYNCHRONIZATION)) { |
501 | port->partner_oper.port_state |= AD_STATE_SYNCHRONIZATION; | 502 | partner->port_state |= AD_STATE_SYNCHRONIZATION; |
502 | } else { | 503 | } else { |
503 | port->partner_oper.port_state &= ~AD_STATE_SYNCHRONIZATION; | 504 | partner->port_state &= ~AD_STATE_SYNCHRONIZATION; |
504 | } | 505 | } |
505 | } | 506 | } |
506 | } | 507 | } |