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

bonding: use plain memcpy in __record_default()

Also remove the pointless comment at the top.
Signed-off-by: default avatarHolger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b99d6ba9
...@@ -516,15 +516,10 @@ static void __record_pdu(struct lacpdu *lacpdu, struct port *port) ...@@ -516,15 +516,10 @@ static void __record_pdu(struct lacpdu *lacpdu, struct port *port)
*/ */
static void __record_default(struct port *port) static void __record_default(struct port *port)
{ {
// validate the port
if (port) { if (port) {
// record the partner admin parameters // record the partner admin parameters
port->partner_oper.port_number = port->partner_admin.port_number; memcpy(&port->partner_oper, &port->partner_admin,
port->partner_oper.port_priority = port->partner_admin.port_priority; sizeof(struct port_params));
port->partner_oper.system = port->partner_admin.system;
port->partner_oper.system_priority = port->partner_admin.system_priority;
port->partner_oper.key = port->partner_admin.key;
port->partner_oper.port_state = port->partner_admin.port_state;
// set actor_oper_port_state.defaulted to true // set actor_oper_port_state.defaulted to true
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