From: Holger Eitzenberger Date: Thu, 18 Dec 2008 03:08:46 +0000 (-0800) Subject: bonding: use plain memcpy in __record_default() X-Git-Tag: v2.6.29-rc1~581^2~128 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5eefd1adceb49cada224a383f4a36c2f27fe4968;p=linux-2.6-omap-h63xx.git bonding: use plain memcpy in __record_default() Also remove the pointless comment at the top. Signed-off-by: Holger Eitzenberger Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index b789dcb7762..0674d414980 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -516,15 +516,10 @@ static void __record_pdu(struct lacpdu *lacpdu, struct port *port) */ static void __record_default(struct port *port) { - // validate the port if (port) { // record the partner admin parameters - port->partner_oper.port_number = port->partner_admin.port_number; - port->partner_oper.port_priority = port->partner_admin.port_priority; - 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; + memcpy(&port->partner_oper, &port->partner_admin, + sizeof(struct port_params)); // set actor_oper_port_state.defaulted to true port->actor_oper_port_state |= AD_STATE_DEFAULTED;