mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +00:00
rtl8187: fix control-message timeouts
commit2e9be536a2
upstream. USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Fixes:605bebe23b
("[PATCH] Add rtl8187 wireless driver") Cc: stable@vger.kernel.org # 2.6.23 Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20211025120522.6045-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
76d2ce7ca9
commit
e1f71a3289
1 changed files with 7 additions and 7 deletions
|
@ -28,7 +28,7 @@ u8 rtl818x_ioread8_idx(struct rtl8187_priv *priv,
|
|||
usb_control_msg(priv->udev, usb_rcvctrlpipe(priv->udev, 0),
|
||||
RTL8187_REQ_GET_REG, RTL8187_REQT_READ,
|
||||
(unsigned long)addr, idx & 0x03,
|
||||
&priv->io_dmabuf->bits8, sizeof(val), HZ / 2);
|
||||
&priv->io_dmabuf->bits8, sizeof(val), 500);
|
||||
|
||||
val = priv->io_dmabuf->bits8;
|
||||
mutex_unlock(&priv->io_mutex);
|
||||
|
@ -45,7 +45,7 @@ u16 rtl818x_ioread16_idx(struct rtl8187_priv *priv,
|
|||
usb_control_msg(priv->udev, usb_rcvctrlpipe(priv->udev, 0),
|
||||
RTL8187_REQ_GET_REG, RTL8187_REQT_READ,
|
||||
(unsigned long)addr, idx & 0x03,
|
||||
&priv->io_dmabuf->bits16, sizeof(val), HZ / 2);
|
||||
&priv->io_dmabuf->bits16, sizeof(val), 500);
|
||||
|
||||
val = priv->io_dmabuf->bits16;
|
||||
mutex_unlock(&priv->io_mutex);
|
||||
|
@ -62,7 +62,7 @@ u32 rtl818x_ioread32_idx(struct rtl8187_priv *priv,
|
|||
usb_control_msg(priv->udev, usb_rcvctrlpipe(priv->udev, 0),
|
||||
RTL8187_REQ_GET_REG, RTL8187_REQT_READ,
|
||||
(unsigned long)addr, idx & 0x03,
|
||||
&priv->io_dmabuf->bits32, sizeof(val), HZ / 2);
|
||||
&priv->io_dmabuf->bits32, sizeof(val), 500);
|
||||
|
||||
val = priv->io_dmabuf->bits32;
|
||||
mutex_unlock(&priv->io_mutex);
|
||||
|
@ -79,7 +79,7 @@ void rtl818x_iowrite8_idx(struct rtl8187_priv *priv,
|
|||
usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0),
|
||||
RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE,
|
||||
(unsigned long)addr, idx & 0x03,
|
||||
&priv->io_dmabuf->bits8, sizeof(val), HZ / 2);
|
||||
&priv->io_dmabuf->bits8, sizeof(val), 500);
|
||||
|
||||
mutex_unlock(&priv->io_mutex);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ void rtl818x_iowrite16_idx(struct rtl8187_priv *priv,
|
|||
usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0),
|
||||
RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE,
|
||||
(unsigned long)addr, idx & 0x03,
|
||||
&priv->io_dmabuf->bits16, sizeof(val), HZ / 2);
|
||||
&priv->io_dmabuf->bits16, sizeof(val), 500);
|
||||
|
||||
mutex_unlock(&priv->io_mutex);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void rtl818x_iowrite32_idx(struct rtl8187_priv *priv,
|
|||
usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0),
|
||||
RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE,
|
||||
(unsigned long)addr, idx & 0x03,
|
||||
&priv->io_dmabuf->bits32, sizeof(val), HZ / 2);
|
||||
&priv->io_dmabuf->bits32, sizeof(val), 500);
|
||||
|
||||
mutex_unlock(&priv->io_mutex);
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ static void rtl8225_write_8051(struct ieee80211_hw *dev, u8 addr, __le16 data)
|
|||
usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0),
|
||||
RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE,
|
||||
addr, 0x8225, &priv->io_dmabuf->bits16, sizeof(data),
|
||||
HZ / 2);
|
||||
500);
|
||||
|
||||
mutex_unlock(&priv->io_mutex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue