summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
authorMandy Lavi <mandy.lavi@freescale.com>2014-11-23 09:48:34 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:41:20 (GMT)
commit285979b90928312051e4eb157a123e9a78bc53bb (patch)
tree79470ba0ea4af3c5000bcd7a92e5a7d70733d8c6 /drivers/net/ethernet/freescale
parent2c4f6dd4fa829b44706518dc36d1056fc6c6a4fc (diff)
downloadlinux-fsl-qoriq-285979b90928312051e4eb157a123e9a78bc53bb.tar.xz
fmd: adjust compat layer following capwap support
The addition of the capwap related structures required a few changes in the compat layer to better support 64b kernel space working with 32b user space Change-Id: I7d49c8cec351ada65259f928df2d6014f5d81342 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/24499 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Richard Schmitt <richard.schmitt@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm.c20
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c7
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h26
3 files changed, 46 insertions, 7 deletions
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 4161a23..75c628a 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
@@ -327,6 +327,20 @@ void LnxWrpPCDIOCTLTypeChecking(void)
/* fm_pcd_ext.h == fm_pcd_ioctls.h */
/*ioc_fm_pcd_counters_params_t : NOT USED */
/*ioc_fm_pcd_exception_params_t : private */
+#if (DPAA_VERSION >= 11)
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_frag_capwap_params_t) == sizeof(t_FmPcdManipFragCapwapParams));
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_reassem_capwap_params_t) == sizeof(t_FmPcdManipReassemCapwapParams));
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_hdr_insrt_by_hdr_params_t) == sizeof(t_FmPcdManipHdrInsrtByHdrParams));
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_hdr_insrt_ip_params_t) == sizeof(t_FmPcdManipHdrInsrtIpParams));
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_hdr_insrt_t) == sizeof(t_FmPcdManipHdrInsrt));
+ ASSERT_COND(sizeof(ioc_fm_manip_hdr_info_t) == sizeof(t_FmManipHdrInfo));
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_hdr_rmv_by_hdr_params_t) == sizeof(t_FmPcdManipHdrRmvByHdrParams));
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_special_offload_capwap_params_t) == sizeof(t_FmPcdManipSpecialOffloadCapwapParams));
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_frag_capwap_stats_t) == sizeof(t_FmPcdManipFragCapwapStats));
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_reassem_capwap_stats_t) == sizeof(t_FmPcdManipReassemCapwapStats));
+ ASSERT_COND(sizeof(ioc_fm_pcd_manip_frag_params_t) == sizeof(t_FmPcdManipFragParams));
+#endif /* (DPAA_VERSION >= 11) */
+
ASSERT_COND(sizeof(ioc_fm_pcd_prs_label_params_t) == sizeof(t_FmPcdPrsLabelParams));
ASSERT_COND(sizeof(ioc_fm_pcd_prs_sw_params_t) == sizeof(t_FmPcdPrsSwParams));
/*ioc_fm_pcd_kg_dflt_value_params_t : private */
@@ -384,8 +398,6 @@ void LnxWrpPCDIOCTLTypeChecking(void)
ASSERT_COND(sizeof(TODO) == sizeof(t_FmPcdManipHdrInsrtByTemplateParams));
ASSERT_COND(sizeof(TODO) == sizeof(t_CapwapFragmentationParams));
ASSERT_COND(sizeof(TODO) == sizeof(t_CapwapReassemblyParams));
- ASSERT_COND(sizeof(TODO) == sizeof(t_FmPcdManipFragOrReasmParams));
- ASSERT_COND(sizeof(TODO) == sizeof(t_FmPcdManipHdrRmvByHdrParams));
*/
#endif
@@ -3702,7 +3714,9 @@ t_Error LnxwrpFmPortIOCTL(t_LnxWrpFmPortDev *p_LnxWrpFmPortDev, unsigned int cmd
port_pcd_params->p_kg_params = compat_ptr(compat_port_pcd_params->p_kg_params);
port_pcd_params->p_plcr_params = compat_ptr(compat_port_pcd_params->p_plcr_params);
port_pcd_params->p_ip_reassembly_manip = compat_ptr(compat_port_pcd_params->p_ip_reassembly_manip);
-
+#if (DPAA_VERSION >= 11)
+ port_pcd_params->p_capwap_reassembly_manip = compat_ptr(compat_port_pcd_params->p_capwap_reassembly_manip);
+#endif
/* the prs member is the same, no compat structure...memcpy only */
if (port_pcd_params->p_prs_params)
{
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c
index 5dc7294..3c29593 100644
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c
@@ -806,7 +806,9 @@ void compat_copy_fm_port_pcd(
_fm_cpt_dbg(compat," param->p_kg_params=%p \n", param->p_kg_params);
_fm_cpt_dbg(compat," param->p_plcr_params=%p \n", param->p_plcr_params);
_fm_cpt_dbg(compat," param->p_ip_reassembly_manip=%p \n", param->p_ip_reassembly_manip);
-
+#if (DPAA_VERSION >= 11)
+ _fm_cpt_dbg(compat," param->p_capwap_reassembly_manip=%p \n", param->p_capwap_reassembly_manip);
+#endif
param->pcd_support = compat_param->pcd_support;
param->net_env_id = compat_pcd_id2ptr(compat_param->net_env_id);
@@ -817,6 +819,9 @@ void compat_copy_fm_port_pcd(
if (param->p_plcr_params)
param->p_plcr_params->plcr_profile_id = compat_pcd_id2ptr(compat_port_pcd_plcr_params->plcr_profile_id);
param->p_ip_reassembly_manip = compat_pcd_id2ptr(compat_param->p_ip_reassembly_manip);
+#if (DPAA_VERSION >= 11)
+ param->p_capwap_reassembly_manip = compat_pcd_id2ptr(compat_param->p_capwap_reassembly_manip);
+#endif
}
}
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h
index 471a1cf..7340396 100644
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h
@@ -416,10 +416,30 @@ typedef struct ioc_compat_fm_pcd_manip_hdr_insrt_specific_l2_params_t {
compat_uptr_t p_data;
} ioc_compat_fm_pcd_manip_hdr_insrt_specific_l2_params_t;
+typedef struct ioc_compat_fm_pcd_manip_hdr_insrt_t {
+ uint8_t size; /**< size of inserted section */
+ compat_uptr_t p_data; /**< data to be inserted */
+} ioc_compat_fm_pcd_manip_hdr_insrt_t;
+
+#if (DPAA_VERSION >= 11)
+typedef struct ioc_compat_fm_pcd_manip_hdr_insrt_ip_params_t {
+ bool calc_l4_checksum; /**< Calculate L4 checksum. */
+ ioc_fm_pcd_manip_hdr_qos_mapping_mode mapping_mode; /**< TODO */
+ uint8_t last_pid_offset; /**< the offset of the last Protocol within
+ the inserted header */
+ uint16_t id; /**< 16 bit New IP ID */
+ ioc_compat_fm_pcd_manip_hdr_insrt_t insrt; /**< size and data to be inserted. */
+} ioc_compat_fm_pcd_manip_hdr_insrt_ip_params_t;
+#endif /* (DPAA_VERSION >= 11) */
+
typedef struct ioc_compat_fm_pcd_manip_hdr_insrt_by_hdr_params_t {
ioc_fm_pcd_manip_hdr_insrt_by_hdr_type type;
union {
ioc_compat_fm_pcd_manip_hdr_insrt_specific_l2_params_t specific_l2_params;
+#if (DPAA_VERSION >= 11)
+ ioc_compat_fm_pcd_manip_hdr_insrt_ip_params_t ip_params;
+ ioc_compat_fm_pcd_manip_hdr_insrt_t insrt;
+#endif /* (DPAA_VERSION >= 11) */
} u;
} ioc_compat_fm_pcd_manip_hdr_insrt_by_hdr_params_t;
@@ -428,8 +448,8 @@ typedef struct ioc_compat_fm_pcd_manip_hdr_insrt_params_t {
union {
ioc_compat_fm_pcd_manip_hdr_insrt_by_hdr_params_t by_hdr;
ioc_compat_fm_pcd_manip_hdr_insrt_generic_params_t generic;
-#ifdef FM_CAPWAP_SUPPORT
-#error CAPWAP not supported!
+#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))
+#error "FM_CAPWAP_SUPPORT feature not supported!"
ioc_fm_pcd_manip_hdr_insrt_by_template_params_t by_template;
#endif /* FM_CAPWAP_SUPPORT */
} u;
@@ -456,7 +476,7 @@ typedef struct ioc_compat_fm_pcd_manip_params_t {
ioc_fm_pcd_manip_special_offload_params_t special_offload;
} u;
compat_uptr_t p_next_manip;
-#ifdef FM_CAPWAP_SUPPORT
+#if (defined(FM_CAPWAP_SUPPORT) && (DPAA_VERSION == 10))
#error "FM_CAPWAP_SUPPORT feature not supported!"
bool frag_or_reasm;
ioc_fm_pcd_manip_frag_or_reasm_params_t frag_or_reasm_params;