[HCA] Fix copy of CA attributes to properly update internal pointers.
[mirror/winof/.git] / hw / mt23108 / user / mlnx_ual_ca.c
index 072e72f..09edb90 100644 (file)
@@ -200,8 +200,9 @@ mlnx_post_query_ca (
        if ( ioctl_status == IB_SUCCESS && p_ca_attr &&\r
                byte_count && !h_uvp_ca->p_hca_attr )\r
        {\r
+               CL_ASSERT( byte_count >= p_ca_attr->size );\r
                h_uvp_ca->p_hca_attr = p_umv_buf->p_inout_buf;\r
-               cl_memcpy(h_uvp_ca->p_hca_attr, p_ca_attr, byte_count);\r
+               ib_copy_ca_attr( h_uvp_ca->p_hca_attr, p_ca_attr );\r
        }\r
        else if (p_umv_buf->p_inout_buf) \r
        {\r