From 3ea74d896c633f03a8e5c7ae81665f70a962673a Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Fri, 6 Oct 2017 23:31:01 -0700 Subject: [PATCH] net/qede/base: use the correct size value Use the correct size value while copying chassis/port id values. Signed-off-by: Rasesh Mody --- drivers/net/qede/base/ecore_dcbx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c index 97fd48457b..201b7d5c2c 100644 --- a/drivers/net/qede/base/ecore_dcbx.c +++ b/drivers/net/qede/base/ecore_dcbx.c @@ -684,9 +684,9 @@ static void ecore_dcbx_get_local_lldp_params(struct ecore_hwfn *p_hwfn, OSAL_MEMCPY(params->lldp_local.local_chassis_id, p_local->local_chassis_id, - OSAL_ARRAY_SIZE(p_local->local_chassis_id)); + sizeof(params->lldp_local.local_chassis_id)); OSAL_MEMCPY(params->lldp_local.local_port_id, p_local->local_port_id, - OSAL_ARRAY_SIZE(p_local->local_port_id)); + sizeof(params->lldp_local.local_port_id)); } static void ecore_dcbx_get_remote_lldp_params(struct ecore_hwfn *p_hwfn, @@ -698,9 +698,9 @@ static void ecore_dcbx_get_remote_lldp_params(struct ecore_hwfn *p_hwfn, OSAL_MEMCPY(params->lldp_remote.peer_chassis_id, p_remote->peer_chassis_id, - OSAL_ARRAY_SIZE(p_remote->peer_chassis_id)); + sizeof(params->lldp_remote.peer_chassis_id)); OSAL_MEMCPY(params->lldp_remote.peer_port_id, p_remote->peer_port_id, - OSAL_ARRAY_SIZE(p_remote->peer_port_id)); + sizeof(params->lldp_remote.peer_port_id)); } static enum _ecore_status_t -- 2.20.1