mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
staging: rtl8192u: fix control-message timeouts
commit4cfa36d312
upstream. USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Fixes:8fc8598e61
("Staging: Added Realtek rtl8192u driver to staging") Cc: stable@vger.kernel.org # 2.6.33 Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20211025120910.6339-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f66258cb60
commit
6c382b6365
1 changed files with 9 additions and 9 deletions
|
@ -236,7 +236,7 @@ int write_nic_byte_E(struct net_device *dev, int indx, u8 data)
|
|||
|
||||
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
|
||||
indx | 0xfe00, 0, usbdata, 1, HZ / 2);
|
||||
indx | 0xfe00, 0, usbdata, 1, 500);
|
||||
kfree(usbdata);
|
||||
|
||||
if (status < 0) {
|
||||
|
@ -258,7 +258,7 @@ int read_nic_byte_E(struct net_device *dev, int indx, u8 *data)
|
|||
|
||||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
indx | 0xfe00, 0, usbdata, 1, HZ / 2);
|
||||
indx | 0xfe00, 0, usbdata, 1, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
|
@ -286,7 +286,7 @@ int write_nic_byte(struct net_device *dev, int indx, u8 data)
|
|||
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
usbdata, 1, HZ / 2);
|
||||
usbdata, 1, 500);
|
||||
kfree(usbdata);
|
||||
|
||||
if (status < 0) {
|
||||
|
@ -313,7 +313,7 @@ int write_nic_word(struct net_device *dev, int indx, u16 data)
|
|||
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
usbdata, 2, HZ / 2);
|
||||
usbdata, 2, 500);
|
||||
kfree(usbdata);
|
||||
|
||||
if (status < 0) {
|
||||
|
@ -340,7 +340,7 @@ int write_nic_dword(struct net_device *dev, int indx, u32 data)
|
|||
status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
RTL8187_REQ_SET_REGS, RTL8187_REQT_WRITE,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
usbdata, 4, HZ / 2);
|
||||
usbdata, 4, 500);
|
||||
kfree(usbdata);
|
||||
|
||||
|
||||
|
@ -367,7 +367,7 @@ int read_nic_byte(struct net_device *dev, int indx, u8 *data)
|
|||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
usbdata, 1, HZ / 2);
|
||||
usbdata, 1, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
|
@ -394,7 +394,7 @@ int read_nic_word(struct net_device *dev, int indx, u16 *data)
|
|||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
usbdata, 2, HZ / 2);
|
||||
usbdata, 2, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
|
@ -418,7 +418,7 @@ static int read_nic_word_E(struct net_device *dev, int indx, u16 *data)
|
|||
|
||||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
indx | 0xfe00, 0, usbdata, 2, HZ / 2);
|
||||
indx | 0xfe00, 0, usbdata, 2, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
|
@ -444,7 +444,7 @@ int read_nic_dword(struct net_device *dev, int indx, u32 *data)
|
|||
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
|
||||
(indx & 0xff) | 0xff00, (indx >> 8) & 0x0f,
|
||||
usbdata, 4, HZ / 2);
|
||||
usbdata, 4, 500);
|
||||
*data = *usbdata;
|
||||
kfree(usbdata);
|
||||
|
||||
|
|
Loading…
Reference in a new issue