From fcb98ca99626b913043d7f0264601ec04a7fbf10 Mon Sep 17 00:00:00 2001 From: Pan Jiafei Date: Wed, 6 May 2015 13:07:48 +0800 Subject: fmd: fix ioctl of FM_CtrlMonGetCounters Signed-off-by: Pan Jiafei Change-Id: If3f1264a02dbc9241b10e6050ff0c55c17170ab1 Reviewed-on: http://git.am.freescale.net:8181/35983 Reviewed-by: Mandy Lavi Reviewed-by: Honghua Yin Tested-by: Honghua Yin diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm.c index 109dd36..886cd5d 100644 --- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm.c +++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm.c @@ -3523,7 +3523,7 @@ t_Error LnxwrpFmIOCTL(t_LnxWrpFmDev *p_LnxWrpFmDev, unsigned int cmd, unsigned l else #endif { - if (copy_from_user(¶m, (void *)arg, sizeof(ioc_fm_counters_params_t))) + if (copy_from_user(¶m, (void *)arg, sizeof(ioc_fm_ctrl_mon_counters_params_t))) RETURN_ERROR(MINOR, E_WRITE_FAILED, NO_MSG); } diff --git a/include/uapi/linux/fmd/Peripherals/fm_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_ioctls.h index 54e65b7..e0c2dd3 100644 --- a/include/uapi/linux/fmd/Peripherals/fm_ioctls.h +++ b/include/uapi/linux/fmd/Peripherals/fm_ioctls.h @@ -328,7 +328,7 @@ typedef struct ioc_fm_vsp_prs_result_params_t { #endif typedef struct fm_ctrl_mon_t { - uint8_t percent_cnt[1]; + uint8_t percent_cnt[2]; } fm_ctrl_mon_t; typedef struct ioc_fm_ctrl_mon_counters_params_t { -- cgit v0.10.2