All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: linux-wireless@vger.kernel.org
Cc: Neo Jou <neojou@gmail.com>, Hans Ulli Kroll <linux@ulli-kroll.de>,
	Ping-Ke Shih <pkshih@realtek.com>,
	Yan-Hsuan Chuang <tony0620emma@gmail.com>,
	Kalle Valo <kvalo@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	kernel@pengutronix.de, Alexander Hochbaum <alex@appudo.com>,
	Da Xue <da@libre.computer>, Po-Hao Huang <phhuang@realtek.com>,
	Andreas Henriksson <andreas@fatal.se>,
	Viktor Petrenko <g0000ga@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH v2 3/3] wifi: rtw88: usb: drop now unnecessary URB size check
Date: Fri, 10 Feb 2023 12:16:32 +0100	[thread overview]
Message-ID: <20230210111632.1985205-4-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20230210111632.1985205-1-s.hauer@pengutronix.de>

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>
---
 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


  parent reply	other threads:[~2023-02-10 11:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 11:16 [PATCH v2 0/3] wifi: rtw88: USB fixes Sascha Hauer
2023-02-10 11:16 ` [PATCH v2 1/3] wifi: rtw88: usb: Set qsel correctly Sascha Hauer
2023-02-13  2:50   ` Ping-Ke Shih
2023-02-15  7:50   ` Kalle Valo
2023-02-10 11:16 ` [PATCH v2 2/3] wifi: rtw88: usb: send Zero length packets if necessary Sascha Hauer
2023-02-13  2:51   ` Ping-Ke Shih
2023-02-10 11:16 ` Sascha Hauer [this message]
2023-02-13  2:51   ` [PATCH v2 3/3] wifi: rtw88: usb: drop now unnecessary URB size check Ping-Ke Shih
2023-02-10 18:19 ` [PATCH v2 0/3] wifi: rtw88: USB fixes Andreas Henriksson
2023-03-01  7:11 ` Sascha Hauer
2023-03-01 15:22   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230210111632.1985205-4-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=alex@appudo.com \
    --cc=andreas@fatal.se \
    --cc=da@libre.computer \
    --cc=g0000ga@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@ulli-kroll.de \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neojou@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=phhuang@realtek.com \
    --cc=pkshih@realtek.com \
    --cc=tony0620emma@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.