diff --git a/include/usb_ops_linux.h b/include/usb_ops_linux.h index 137031b..3ec6ac4 100644 --- a/include/usb_ops_linux.h +++ b/include/usb_ops_linux.h @@ -44,16 +44,6 @@ #define usb_read_interrupt_complete(purb, regs) usb_read_interrupt_complete(purb) #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) -#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \ - usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), (timeout_ms)) -#else -#define rtw_usb_control_msg(dev, pipe, request, requesttype, value, index, data, size, timeout_ms) \ - usb_control_msg((dev), (pipe), (request), (requesttype), (value), (index), (data), (size), \ - ((timeout_ms) == 0) || ((timeout_ms) * HZ / 1000 > 0) ? ((timeout_ms) * HZ / 1000) : 1) -#endif - - #ifdef CONFIG_USB_SUPPORT_ASYNC_VDN_REQ int usb_async_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val); int usb_async_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val); diff --git a/os_dep/linux/usb_ops_linux.c b/os_dep/linux/usb_ops_linux.c index a05446e..709023a 100644 --- a/os_dep/linux/usb_ops_linux.c +++ b/os_dep/linux/usb_ops_linux.c @@ -106,7 +106,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 inde _rtw_memcpy(pIo_buf, pdata, len); } - status = rtw_usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT); + status = usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT); if (status == len) { /* Success this control transfer. */ rtw_reset_continual_io_error(pdvobjpriv); @@ -173,7 +173,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 inde t_reg = 0x4e0; - status = rtw_usb_control_msg(udev, t_pipe, t_req, t_reqtype, t_reg, t_index, pIo_buf, t_len, RTW_USB_CONTROL_MSG_TIMEOUT); + status = usb_control_msg(udev, t_pipe, t_req, t_reqtype, t_reg, t_index, pIo_buf, t_len, RTW_USB_CONTROL_MSG_TIMEOUT); if (status == t_len) rtw_reset_continual_io_error(pdvobjpriv);