[IBAL] Change CEP DREP API
[mirror/winof/.git] / core / al / user / ual_cm_cep.c
index dc4cd02..e404fff 100644 (file)
@@ -1196,7 +1196,8 @@ ib_api_status_t
 al_cep_drep(\r
        IN                              ib_al_handle_t                          h_al,\r
        IN                              net32_t                                         cid,\r
-       IN              const   ib_cm_drep_t* const                     p_cm_drep )\r
+       IN              const   uint8_t* const                          p_pdata OPTIONAL,\r
+       IN              const   uint8_t                                         pdata_len )\r
 {\r
        ib_api_status_t                 status;\r
        ual_cep_drep_ioctl_t    ioctl;\r
@@ -1210,26 +1211,23 @@ al_cep_drep(
                return IB_INVALID_HANDLE;\r
        }\r
 \r
-       if( !p_cm_drep )\r
-       {\r
-               AL_EXIT( AL_DBG_CM );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-    cl_memclr(&ioctl, sizeof(ioctl));\r
        ioctl.cid = cid;\r
-       ioctl.cm_drep = *p_cm_drep;\r
        /* Copy private data, if any. */\r
-       if( p_cm_drep->p_drep_pdata )\r
+       if( p_pdata )\r
        {\r
-               if( p_cm_drep->drep_length > IB_DREP_PDATA_SIZE )\r
+               if( pdata_len > IB_DREP_PDATA_SIZE )\r
                {\r
                        AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
                                ("private data larger than DREP private data.\n") );\r
                        return IB_INVALID_SETTING;\r
                }\r
 \r
-               cl_memcpy(\r
-                       ioctl.pdata, p_cm_drep->p_drep_pdata, p_cm_drep->drep_length );\r
+               cl_memcpy( ioctl.pdata, p_pdata, pdata_len );\r
+               ioctl.pdata_len = pdata_len;\r
+       }\r
+       else\r
+       {\r
+               ioctl.pdata_len = 0;\r
        }\r
 \r
        if( !DeviceIoControl( g_al_device, UAL_CEP_DREP, &ioctl,\r