ctrl vendor req value is always 0x05

The bRequest value for the vendor specific control requests sent by this
driver is always 0x05. Replace the function parameter with the define from
usb_ops.h.

This patch is an adaptation of commit eeb4661560ff ("staging: rtl8188eu:
ctrl vendor req value is always 0x05") for the new r8188eu driver.

Link: https://lore.kernel.org/r/20210818200041.10870-1-martin@kaiser.cx
This commit is contained in:
Martin Kaiser
2021-08-18 22:00:40 +02:00
committed by Carlos Garcés
parent 64831e6777
commit 28e0bba794
3 changed files with 10 additions and 31 deletions

View File

@@ -23,7 +23,7 @@ struct rtw_async_write_data {
struct usb_ctrlrequest dr;
};
int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 index, void *pdata, u16 len, u8 requesttype)
int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u16 value, u16 index, void *pdata, u16 len, u8 requesttype)
{
_adapter *padapter = pintfhdl->padapter;
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
@@ -106,7 +106,7 @@ int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 inde
_rtw_memcpy(pIo_buf, pdata, len);
}
status = usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
status = usb_control_msg(udev, pipe, REALTEK_USB_VENQT_CMD_REQ, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
if (status == len) { /* Success this control transfer. */
rtw_reset_continual_io_error(pdvobjpriv);