mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-21 06:50:25 +00:00
wifi: rtw88: usb: drop now unnecessary URB size check
Now that we send URBs with the URB_ZERO_PACKET flag set we no longer need to make sure that the URB sizes are not multiple of the bulkout_size. Drop the check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230210111632.1985205-4-s.hauer@pengutronix.de
This commit is contained in:
parent
07ce9fa6ab
commit
462c8db6a0
1 changed files with 1 additions and 14 deletions
|
@ -414,24 +414,11 @@ static int rtw_usb_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf,
|
||||||
u32 size)
|
u32 size)
|
||||||
{
|
{
|
||||||
const struct rtw_chip_info *chip = rtwdev->chip;
|
const struct rtw_chip_info *chip = rtwdev->chip;
|
||||||
struct rtw_usb *rtwusb;
|
|
||||||
struct rtw_tx_pkt_info pkt_info = {0};
|
struct rtw_tx_pkt_info pkt_info = {0};
|
||||||
u32 len, desclen;
|
|
||||||
|
|
||||||
rtwusb = rtw_get_usb_priv(rtwdev);
|
|
||||||
|
|
||||||
pkt_info.tx_pkt_size = size;
|
pkt_info.tx_pkt_size = size;
|
||||||
pkt_info.qsel = TX_DESC_QSEL_BEACON;
|
pkt_info.qsel = TX_DESC_QSEL_BEACON;
|
||||||
|
pkt_info.offset = chip->tx_pkt_desc_sz;
|
||||||
desclen = chip->tx_pkt_desc_sz;
|
|
||||||
len = desclen + size;
|
|
||||||
if (len % rtwusb->bulkout_size == 0) {
|
|
||||||
len += RTW_USB_PACKET_OFFSET_SZ;
|
|
||||||
pkt_info.offset = desclen + RTW_USB_PACKET_OFFSET_SZ;
|
|
||||||
pkt_info.pkt_offset = 1;
|
|
||||||
} else {
|
|
||||||
pkt_info.offset = desclen;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rtw_usb_write_data(rtwdev, &pkt_info, buf);
|
return rtw_usb_write_data(rtwdev, &pkt_info, buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue