Skip to content
Commit 00f1f476 authored by Guillaume La Roque's avatar Guillaume La Roque Committed by Xulin Sun
Browse files

net: ethernet: ti: cpsw-proxy-client: Fix size of ipv4_addr member

commit ea5090c97de3b1e8f97323d103b2a3dcc33a876d from
git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git



The ipv4_addr member of struct cpsw_virt_port is defined for being used
when sending ETHREMOTECFG_IPv4_REGISTER and ETHREMOTECFG_IPv4_DEREGISTER
requests. The same ipv4_addr member is defined in their respective request
structures in drivers/net/ethernet/ti/eth_remote_msg.h as an array of u8 of
size ETHREMOTECFG_IPV4ADDRLEN which is 4. The ipv4_addr member should have
a size of 32 bits and thus should be an array of u8 of size 4, instead of
the currently defined size of 8.

Fix this by defining the ipv4_addr member as an array of u8 having the size
ETHREMOTECFG_IPV4ADDRLEN. Also, use the ETHREMOTECFG_IPV4ADDRLEN macro for
memcpy when creating requests in the create_request() function for the
ETHREMOTECFG_IPV4_REGISTER and ETHREMOTECFG_IPV4_DEREGISTER requests.

Fixes: 9343810f28a1 ("net: ethernet: ti: Add CPSW Proxy Client driver")
Signed-off-by: default avatarGuillaume La Roque <glaroque@baylibre.com>
Signed-off-by: default avatarSiddharth Vadapalli <s-vadapalli@ti.com>
Signed-off-by: default avatarVignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: default avatarXulin Sun <xulin.sun@windriver.com>
parent 64bfa9aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment