[dpdk-dev,06/17] net/qede/base: use the correct size value
Checks
Commit Message
Use the correct size value while copying chassis/port id values.
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
drivers/net/qede/base/ecore_dcbx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
@@ -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