[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dceebe908ea84c34863cbed1e54e3e38@realtek.com>
Date: Mon, 13 Feb 2023 02:51:40 +0000
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Sascha Hauer <s.hauer@...gutronix.de>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC: Neo Jou <neojou@...il.com>, Hans Ulli Kroll <linux@...i-kroll.de>,
Yan-Hsuan Chuang <tony0620emma@...il.com>,
Kalle Valo <kvalo@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Martin Blumenstingl" <martin.blumenstingl@...glemail.com>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
Alexander Hochbaum <alex@...udo.com>,
Da Xue <da@...re.computer>, Bernie Huang <phhuang@...ltek.com>,
Andreas Henriksson <andreas@...al.se>,
Viktor Petrenko <g0000ga@...il.com>
Subject: RE: [PATCH v2 3/3] wifi: rtw88: usb: drop now unnecessary URB size check
> -----Original Message-----
> From: Sascha Hauer <s.hauer@...gutronix.de>
> Sent: Friday, February 10, 2023 7:17 PM
> To: linux-wireless@...r.kernel.org
> Cc: Neo Jou <neojou@...il.com>; Hans Ulli Kroll <linux@...i-kroll.de>; Ping-Ke Shih <pkshih@...ltek.com>;
> Yan-Hsuan Chuang <tony0620emma@...il.com>; Kalle Valo <kvalo@...nel.org>; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org; Martin Blumenstingl <martin.blumenstingl@...glemail.com>;
> kernel@...gutronix.de; Alexander Hochbaum <alex@...udo.com>; Da Xue <da@...re.computer>; Bernie Huang
> <phhuang@...ltek.com>; Andreas Henriksson <andreas@...al.se>; Viktor Petrenko <g0000ga@...il.com>; Sascha
> Hauer <s.hauer@...gutronix.de>
> Subject: [PATCH v2 3/3] 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@...gutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@...ltek.com>
> ---
> 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 1a09c9288198a..2a8336b1847a5 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.30.2
Powered by blists - more mailing lists