From patchwork Fri Feb 10 11:16:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 55396 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp893286wrn; Fri, 10 Feb 2023 03:19:30 -0800 (PST) X-Google-Smtp-Source: AK7set8brbMnX/00qbv7O6nDotjv67tGE3q3cSVJaSCDzduleIlWyTmPjLtmUZO2AG5voIL7DSSV X-Received: by 2002:a50:ccc2:0:b0:4ab:2500:63b6 with SMTP id b2-20020a50ccc2000000b004ab250063b6mr4364695edj.14.1676027969912; Fri, 10 Feb 2023 03:19:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676027969; cv=none; d=google.com; s=arc-20160816; b=o22qigqumxbyVrAsdeYF1iKJri/NBaCS+jzqfKBiCYRd/cYqqd8chdAvoEhylS3x7+ o0Ih00TtO9F9kJiqGtSXKVpEj0+PYJCFQMS7VaY+IkoI1k6Z4CoJ4cwVdpQaxyPAAnvY pwiju8oJWSBBLV2DMDbAW+HQ0LrGorfpOW5uQI61FGQCRrFgcwprLvtqBwScmdFbw2/U 2lbF5YRx9BpCkGYs/wGymo0PKUUZ0Q8c2jUetotoC1DUMLt0/xh7T10H8FVwSJpQJQkO Bcd/s17mawPDJsC5aFofA/vMrM/ecEMgBrAKLLmKf8KUwvglmUnnUhzyistTvD2CdN9e exZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4zgAlTa7hHFgvtA4Ao84WVtr26ugCpvZeEXjBFgMGIA=; b=AjpWhnhhJjiVkBb4vnznWncpNqV4fjp1BfRbFbKg/KvdEynaw8dPSrTrIt+IAVsZ+M XL4E0e7P4QA5LNgYaVbcnjH8i1vTDGO0zTryiYhfBLBZh/vYEvZ/iRthfIajTAIPbq6I hbzAF8CqBG2VbR06R4lFmap3U00y+6xcpELNrbddxO7wtpsa0AisKt7WSO7T6a85cZZB 8Cti0T5j6Y+1uuqUNsGdofqCmz2IFEYlOvxDRtZ0d7yxpcLa1Au7fL1P+uBLvJgUoVuS 6z8zQe+PZsH/lo6aMBk2t9OrZJWked0Wi3o+54YErbHokzTTQC5iT2zZ/5RmStH/bInx O+Eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u13-20020a056402110d00b004aab2fed3e7si5223841edv.275.2023.02.10.03.19.07; Fri, 10 Feb 2023 03:19:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232382AbjBJLRJ (ORCPT + 99 others); Fri, 10 Feb 2023 06:17:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232075AbjBJLQx (ORCPT ); Fri, 10 Feb 2023 06:16:53 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3869B72DF7 for ; Fri, 10 Feb 2023 03:16:45 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQROO-0003KW-Oy; Fri, 10 Feb 2023 12:16:36 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pQROM-003xEZ-EI; Fri, 10 Feb 2023 12:16:35 +0100 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pQROM-008k9Z-Nh; Fri, 10 Feb 2023 12:16:34 +0100 From: Sascha Hauer To: linux-wireless@vger.kernel.org Cc: Neo Jou , Hans Ulli Kroll , Ping-Ke Shih , Yan-Hsuan Chuang , Kalle Valo , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Blumenstingl , kernel@pengutronix.de, Alexander Hochbaum , Da Xue , Po-Hao Huang , Andreas Henriksson , Viktor Petrenko , Sascha Hauer Subject: [PATCH v2 1/3] wifi: rtw88: usb: Set qsel correctly Date: Fri, 10 Feb 2023 12:16:30 +0100 Message-Id: <20230210111632.1985205-2-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230210111632.1985205-1-s.hauer@pengutronix.de> References: <20230210111632.1985205-1-s.hauer@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757442704525257032?= X-GMAIL-MSGID: =?utf-8?q?1757442704525257032?= We have to extract qsel from the skb before doing skb_push() on it, otherwise qsel will always be 0. Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support") Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw88/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index 4ef38279b64c9..d9e995544e405 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -471,9 +471,9 @@ static int rtw_usb_tx_write(struct rtw_dev *rtwdev, u8 *pkt_desc; int ep; + pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb); pkt_desc = skb_push(skb, chip->tx_pkt_desc_sz); memset(pkt_desc, 0, chip->tx_pkt_desc_sz); - pkt_info->qsel = rtw_usb_tx_queue_mapping_to_qsel(skb); ep = qsel_to_ep(rtwusb, pkt_info->qsel); rtw_tx_fill_tx_desc(pkt_info, skb); rtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data); From patchwork Fri Feb 10 11:16:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 55398 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp893592wrn; Fri, 10 Feb 2023 03:20:09 -0800 (PST) X-Google-Smtp-Source: AK7set/4nx0KaqGtu3KEkuTGkIORtl4UdQDfOziBJfanr6nST1y4QbtEmvKJ2HgY0/6Kw2nM05MV X-Received: by 2002:a05:6a20:4288:b0:be:a55a:8910 with SMTP id o8-20020a056a20428800b000bea55a8910mr19592289pzj.4.1676028008863; Fri, 10 Feb 2023 03:20:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676028008; cv=none; d=google.com; s=arc-20160816; b=BMl+EunxBnchakdOQ0Z0Pgp+sGugS+dqK9EQ2Xv3VRFs+ox3EItqFNtRhnWIUlEDIP Cr/Nq8XuERn+AjUr+VqDAr9ogJgdUiv13XdjIzTw7p3LzPoxM3FxMozwojf/qv3C99zH QZHcygdlLdoafgtbarfx15ALC4Gu+VNn6C1PbBbHN3LmsIRFi2rY219c9DuKzyMildLc sqCDG1+zKCFbmKKjnksleC5iqsFB5zw06JpuMq5U78XmEqGrhKB8ZrpBkQNmaFatOW6x k8v+pNxXNjKKzTg9EHC08YyEkK5/94atFBs1xyYkX9gqOAmZrxhdq/VO8pc55BsXmWIG e6Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LwThbMDmhnG8hLYXfbrhjAOpOHItTwnaz3KVLzMX2CQ=; b=wDbXKZvAMZ+vJLC3pBElnYTJEoiv1gpeNtbpw9svxzvPpSNP4BzJ0dNpysdf1AnsCy VArx5E2fuzA1T/dE+g+uU5VBhkJT1RtGDBLNUCaEVTzYW8fH2/n2qSX53cfzSe9UUyZN KGa5b/8FLIwgMVwtKpzDAqjVbYhcfKmcrgD8ILFMdKLpFjPGJ2dGQO1sfFqKP9/G+btv EsCqavDNYuexwj0gZsVAvI4+yTGhGOc6yIXvhWt7Vmd4Ok+okPzWAr2vzizadNSeDTTz Eno6Tdod7tqk6DqpeGYxWg8VKXBrZyuoGViRFLuABLXfxm3Za7y0A14+al+NTdzxPt4F SvWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020a637e09000000b004fb12ee7cb9si4392138pgc.354.2023.02.10.03.19.56; Fri, 10 Feb 2023 03:20:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232283AbjBJLRG (ORCPT + 99 others); Fri, 10 Feb 2023 06:17:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232138AbjBJLQx (ORCPT ); Fri, 10 Feb 2023 06:16:53 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187705275 for ; Fri, 10 Feb 2023 03:16:45 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQROO-0003KU-Os; Fri, 10 Feb 2023 12:16:36 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pQROM-003xEU-Aa; Fri, 10 Feb 2023 12:16:35 +0100 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pQROM-008k9c-OR; Fri, 10 Feb 2023 12:16:34 +0100 From: Sascha Hauer To: linux-wireless@vger.kernel.org Cc: Neo Jou , Hans Ulli Kroll , Ping-Ke Shih , Yan-Hsuan Chuang , Kalle Valo , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Blumenstingl , kernel@pengutronix.de, Alexander Hochbaum , Da Xue , Po-Hao Huang , Andreas Henriksson , Viktor Petrenko , Sascha Hauer Subject: [PATCH v2 2/3] wifi: rtw88: usb: send Zero length packets if necessary Date: Fri, 10 Feb 2023 12:16:31 +0100 Message-Id: <20230210111632.1985205-3-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230210111632.1985205-1-s.hauer@pengutronix.de> References: <20230210111632.1985205-1-s.hauer@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757442745131718905?= X-GMAIL-MSGID: =?utf-8?q?1757442745131718905?= Zero length packets are necessary when sending URBs with size multiple of bulkout_size, otherwise the hardware just stalls. Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support") Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw88/usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index d9e995544e405..1a09c9288198a 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -271,6 +271,7 @@ static int rtw_usb_write_port(struct rtw_dev *rtwdev, u8 qsel, struct sk_buff *s return -ENOMEM; usb_fill_bulk_urb(urb, usbd, pipe, skb->data, skb->len, cb, context); + urb->transfer_flags |= URB_ZERO_PACKET; ret = usb_submit_urb(urb, GFP_ATOMIC); usb_free_urb(urb); From patchwork Fri Feb 10 11:16:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 55397 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp893371wrn; Fri, 10 Feb 2023 03:19:39 -0800 (PST) X-Google-Smtp-Source: AK7set+Zkz1JMNEMyrqXqCNB1ca16MJ2fZqNxiSYaQ9otCI/XCVzO3QXqu0a5L58evSSNLd1uOot X-Received: by 2002:a17:906:81c2:b0:84d:4e9b:ace5 with SMTP id e2-20020a17090681c200b0084d4e9bace5mr15010188ejx.67.1676027979260; Fri, 10 Feb 2023 03:19:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676027979; cv=none; d=google.com; s=arc-20160816; b=shKiLauuG7oXJSS4ZPtrWJi89xrV5V647lnBsuuZM3w8tAh5XZkuh3YMtRtTMij/TF liV357h39rUSXQretD4fltBgDDK/W0/TsYVuIJ3vyEFUfbwChpjC7PNTZgVvA0vIVQ1q dKUc0dObTKLn8tKQ3b9yraFoiOu4cLzsYyJNxBNwy7x95+EucGnE0SVbUxZrT10GQC0v RYZ3qa8E+gFOUcLuQrMhXToMfPWDzzF+RM0MDo2ax4zgKvXJPaY8GQAyDTdNZLfy7xkk k5Nu4XpxnnsTI+vsZrWl72aCv0AZimBOz//F6I71dtBfzDFowRJVZJBwz+IeWWS4GW5J yNLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ybBEom8/8FD2++OnTMiY6Ed2SOXeJMPn8MaoclS4HDc=; b=FDtdQI9OR58Gcslx0/e1TPQ+AtKe9jlf/UaSExUHBUOeX3Z9vWO6PqrXA8EFXtY7Kj I0BribzeaudhlJNxi+IlH4zYKhfLrOhsSzOxU3E4SeAbWwzgbPHQDZ4WT+v0wqjh341s qxEPYB3EeiNWf4XJczCfHpgv+cH/lN4rPOCcM+FYMT1wiJHcEQunJbccFr2V3aIs5Ijl ssgXY7NrlQOD9kxVr6B78/75f7Q4UYCBUbUJ1f1352buobbVgQcb3VSpXRgtzt48jI88 w1KmnxgHTIUQGCEIQc1xQqG/MmWc958iPIAzKLXfrnj15Yq6zO5o3vrw6Z3cLnaBZ5gW rYNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13-20020a170906010d00b0088d614531a7si6258554eje.381.2023.02.10.03.19.16; Fri, 10 Feb 2023 03:19:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231654AbjBJLRE (ORCPT + 99 others); Fri, 10 Feb 2023 06:17:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231736AbjBJLQx (ORCPT ); Fri, 10 Feb 2023 06:16:53 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2E4472DF4 for ; Fri, 10 Feb 2023 03:16:44 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pQROO-0003KX-Ok; Fri, 10 Feb 2023 12:16:36 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pQROM-003xEb-EO; Fri, 10 Feb 2023 12:16:35 +0100 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pQROM-008k9f-P8; Fri, 10 Feb 2023 12:16:34 +0100 From: Sascha Hauer To: linux-wireless@vger.kernel.org Cc: Neo Jou , Hans Ulli Kroll , Ping-Ke Shih , Yan-Hsuan Chuang , Kalle Valo , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Blumenstingl , kernel@pengutronix.de, Alexander Hochbaum , Da Xue , Po-Hao Huang , Andreas Henriksson , Viktor Petrenko , Sascha Hauer Subject: [PATCH v2 3/3] wifi: rtw88: usb: drop now unnecessary URB size check Date: Fri, 10 Feb 2023 12:16:32 +0100 Message-Id: <20230210111632.1985205-4-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230210111632.1985205-1-s.hauer@pengutronix.de> References: <20230210111632.1985205-1-s.hauer@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757442714065011098?= X-GMAIL-MSGID: =?utf-8?q?1757442714065011098?= 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 --- 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); }