From patchwork Fri Feb 10 09:26:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 55347 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp853361wrn; Fri, 10 Feb 2023 01:34:53 -0800 (PST) X-Google-Smtp-Source: AK7set/8ZYEaOfEdJspf7Mw8g2CG0ZKblL6c0mQaFmn4VBO5rcgIfa0wHTGUeLobYaaeKw5wtvX/ X-Received: by 2002:a17:907:8c07:b0:879:ab3:93d1 with SMTP id ta7-20020a1709078c0700b008790ab393d1mr18551836ejc.4.1676021693175; Fri, 10 Feb 2023 01:34:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676021693; cv=none; d=google.com; s=arc-20160816; b=neitqJZqB4+x2wrmzNwiCpgmBlBunLvGhEmrvmHLoVAM0MmWP+BDTfpJ5HfNM1ddU3 6t2ZWtPHAKSt1mSLlCCuxW98eWgdowKDKIoDwE3rFt6wH3bPqSmZ4mpCqONvdvAHeG4p XUFXeL3kNa77ytxE6Cx8wOY7OBmvhwgKCGsxXo6PbNeMdQjvRiDye/+BymREasXeR/8a +rUyzSN9NbUPAY68jThk8zPlRsaSk83rLWsaTeCrivBQfYFpcY8rWx5yRoAKIWikyk+c u/cdHTvTaZyzdn/8HF83J0y02qyTJX/Em86qR5Q1p+Hxx7HDD81elB51wP5l+3ke0hT4 5r0g== 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=O/9vHpc56jrxyqajzJO02vsMzoOfs+Ef7/+Qy0JBnqOdvB02Bktl2cnbPTpglJdQnU Y2NbGIQSjDe0RKhcVXpJVtwcsVagbCvmymqMnofZkvqvD/6uGRbFqQCiS+usPrJ6RHs1 anVB8oS077KBeWA1jOmT/FacthI18E2IDPKQvlQ/rlOVq+a17ymlVT2HphWyHfRpTZy1 Lh+JwOexBNaaBwAMEqMAgn/quQaCvaqP4vOkNM12R9B4ig8XQ+RuwLBLkvnQ+T5VcbIG nWuK0BL9Jcs+EuPK609H12WzOhKY8uV0NR5etkQ4xi0CEf6HtpgAhDRokB2+J+4kx/1q 6r5w== 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 up29-20020a170907cc9d00b00886f6e734a1si4730268ejc.16.2023.02.10.01.34.29; Fri, 10 Feb 2023 01:34:53 -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 S231883AbjBJJ1f (ORCPT + 99 others); Fri, 10 Feb 2023 04:27:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231594AbjBJJ11 (ORCPT ); Fri, 10 Feb 2023 04:27:27 -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 883B46569B for ; Fri, 10 Feb 2023 01:27:17 -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 1pQPgI-0003Up-2r; Fri, 10 Feb 2023 10:26:58 +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 1pQPg9-003w62-Nn; Fri, 10 Feb 2023 10:26:50 +0100 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pQPg9-002tID-UY; Fri, 10 Feb 2023 10:26:49 +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 1/2] wifi: rtw88: usb: Set qsel correctly Date: Fri, 10 Feb 2023 10:26:41 +0100 Message-Id: <20230210092642.685905-2-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230210092642.685905-1-s.hauer@pengutronix.de> References: <20230210092642.685905-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?1757436122938483674?= X-GMAIL-MSGID: =?utf-8?q?1757436122938483674?= 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 --- 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);