diff --git a/patches.kernel.org/6.2.2-010-wifi-rtw88-usb-drop-now-unnecessary-URB-size-ch.patch b/patches.kernel.org/6.2.2-010-wifi-rtw88-usb-drop-now-unnecessary-URB-size-ch.patch new file mode 100644 index 0000000..4a88e1c --- /dev/null +++ b/patches.kernel.org/6.2.2-010-wifi-rtw88-usb-drop-now-unnecessary-URB-size-ch.patch @@ -0,0 +1,56 @@ +From: Sascha Hauer +Date: Fri, 10 Feb 2023 12:16:32 +0100 +Subject: [PATCH] wifi: rtw88: usb: drop now unnecessary URB size check +References: bsc#1012628 +Patch-mainline: 6.2.2 +Git-commit: 462c8db6a01160836c68e262d25566f2447148d9 + +commit 462c8db6a01160836c68e262d25566f2447148d9 upstream. + +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 +Reviewed-by: Ping-Ke Shih +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/20230210111632.1985205-4-s.hauer@pengutronix.de +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Jiri Slaby +--- + drivers/net/wireless/realtek/rtw88/usb.c | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c +index 1a09c928..2a8336b1 100644 +--- a/drivers/net/wireless/realtek/rtw88/usb.c ++++ b/drivers/net/wireless/realtek/rtw88/usb.c +@@ -414,24 +414,11 @@ static int rtw_usb_write_data_rsvd_page(struct rtw_dev *rtwdev, u8 *buf, + u32 size) + { + const struct rtw_chip_info *chip = rtwdev->chip; +- struct rtw_usb *rtwusb; + 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.qsel = TX_DESC_QSEL_BEACON; +- +- 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; +- } ++ pkt_info.offset = chip->tx_pkt_desc_sz; + + return rtw_usb_write_data(rtwdev, &pkt_info, buf); + } +-- +2.35.3 + diff --git a/series.conf b/series.conf index 9787613..11e6c19 100644 --- a/series.conf +++ b/series.conf @@ -49,6 +49,7 @@ patches.kernel.org/6.2.2-007-scripts-tags.sh-fix-incompatibility-with-PCRE2.patch patches.kernel.org/6.2.2-008-wifi-rtw88-usb-Set-qsel-correctly.patch patches.kernel.org/6.2.2-009-wifi-rtw88-usb-send-Zero-length-packets-if-nece.patch + patches.kernel.org/6.2.2-010-wifi-rtw88-usb-drop-now-unnecessary-URB-size-ch.patch ######################################################## # Build fixes that apply to the vanilla kernel too.