Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5938792rwb; Tue, 22 Nov 2022 06:54:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf65X+S2LAyi2noROHEHBtrRlGReGiILoLRXCH7PWsbcPQlGusOHcJoCFnzHNhwDn1029txx X-Received: by 2002:a17:906:b04c:b0:78d:9b0a:7b0b with SMTP id bj12-20020a170906b04c00b0078d9b0a7b0bmr20108502ejb.197.1669128861365; Tue, 22 Nov 2022 06:54:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669128861; cv=none; d=google.com; s=arc-20160816; b=dfM2YCmt0VzIfuf3s9gil3hlqbIzydXISHGjZ6j5OQYcIVAxs6DczgGbmy60u3Zdl4 szcLBNMvCFSIHl9bFirdxY9FmCi5rgaj7dMRQAzxgFNJAVf4Vm5eV6B4u/RHbuN4gCw6 kwzdEINflAaBfBmNMZ8on00tGuQjyJ/QJsIm5+SwM1/RCnfkLYGbuvjlfuVSjgBvZZh4 Dm+ngIq0HBh5gs9Lj8GjG+jFs1e5J5MRPgACfgXWGM8QO9i9ZX9oFtHv5RhkMzFN0LXt UE+O1Q+iCHg5wy5hDPPTFoq/hW9ZbUbFYLpI1bZtFH8PjSTByNaVV4w9gKpi1tgFFcvD Sqcg== 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 :message-id:date:subject:cc:to:from; bh=+YtZFAh3c+cCGzaFuFReXE3VxiL5JzgYkDA2AKt2Fqo=; b=lZoyKNW78OGokQIfO+YcjijONj3AlAPeckFcmCQqBZE9N9xtcliMPjgaEyTcDdKW0g GbXsDolqS/x6Oef4hxkmN8Yo9gk3yiSR7BStYIXfccCPzN3tYJzOA/hbyQrBrAgXITY3 6tTXBjQJOLMK98e1K1rhNB6xysLXWOoSQ10ifWbh6R3WwMN1O2bYvX6F8Hy895YCXiup r4E8/QdMMiyLjdBU29L2kO7ucHT/s1jtcVa9HEkYyqqSURdn96uOdFkuulRKcfhibkPv v9AdVGwF4YZLpeejlBssdbwLXUXQO+9+mF6UbbKiPDHRem33FUfe7W+XrMlkKNEsKaPx TjcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs12-20020a1709072d0c00b007a00aaf659csi503384ejc.198.2022.11.22.06.54.02; Tue, 22 Nov 2022 06:54:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233748AbiKVOxI (ORCPT + 68 others); Tue, 22 Nov 2022 09:53:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233620AbiKVOxB (ORCPT ); Tue, 22 Nov 2022 09:53:01 -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 860D820F for ; Tue, 22 Nov 2022 06:52:50 -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 1oxUdc-0006Ld-4v; Tue, 22 Nov 2022 15:52:40 +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 1oxUdX-005s7M-HJ; Tue, 22 Nov 2022 15:52:36 +0100 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oxUdX-00H3kU-I2; Tue, 22 Nov 2022 15:52:35 +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, Johannes Berg , Alexander Hochbaum , Da Xue , Po-Hao Huang , Viktor Petrenko , Sascha Hauer Subject: [PATCH v3 00/11] RTW88: Add support for USB variants Date: Tue, 22 Nov 2022 15:52:15 +0100 Message-Id: <20221122145226.4065843-1-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-wireless@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=ham 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-wireless@vger.kernel.org This is the third round of adding support for the USB variants to the RTW88 driver. There are a few changes to the last version which make it worth looking at this version. First of all RTL8723du and RTL8821cu are tested working now. The issue here was that the txdesc checksum calculation was wrong. I found the correct calculation in various downstream drivers found on github. The second big issue was that TX packet aggregation was wrong. When aggregating packets each packet start has to be aligned to eight bytes. The necessary alignment was added to the total URB length before checking if there is another packet to aggregate, so the URB length included that padding after the last packet, which is wrong. Fixing this makes the driver work much more reliably. I added all people to Cc: who showed interest in this driver and I want to welcome you for testing and reviewing. Sascha Sascha Hauer (11): rtw88: print firmware type in info message rtw88: Call rtw_fw_beacon_filter_config() with rtwdev->mutex held rtw88: Drop rf_lock rtw88: Drop h2c.lock rtw88: Drop coex mutex rtw88: iterate over vif/sta list non-atomically rtw88: Add common USB chip support rtw88: Add rtw8821cu chipset support rtw88: Add rtw8822bu chipset support rtw88: Add rtw8822cu chipset support rtw88: Add rtw8723du chipset support drivers/net/wireless/realtek/rtw88/Kconfig | 47 + drivers/net/wireless/realtek/rtw88/Makefile | 14 + drivers/net/wireless/realtek/rtw88/coex.c | 3 +- drivers/net/wireless/realtek/rtw88/debug.c | 15 + drivers/net/wireless/realtek/rtw88/fw.c | 13 +- drivers/net/wireless/realtek/rtw88/hci.h | 9 +- drivers/net/wireless/realtek/rtw88/mac.c | 3 + drivers/net/wireless/realtek/rtw88/mac80211.c | 2 +- drivers/net/wireless/realtek/rtw88/main.c | 12 +- drivers/net/wireless/realtek/rtw88/main.h | 12 +- drivers/net/wireless/realtek/rtw88/phy.c | 6 +- drivers/net/wireless/realtek/rtw88/ps.c | 2 +- drivers/net/wireless/realtek/rtw88/reg.h | 1 + drivers/net/wireless/realtek/rtw88/rtw8723d.c | 28 + drivers/net/wireless/realtek/rtw88/rtw8723d.h | 13 +- .../net/wireless/realtek/rtw88/rtw8723du.c | 36 + .../net/wireless/realtek/rtw88/rtw8723du.h | 10 + drivers/net/wireless/realtek/rtw88/rtw8821c.c | 18 + drivers/net/wireless/realtek/rtw88/rtw8821c.h | 21 + .../net/wireless/realtek/rtw88/rtw8821cu.c | 50 + .../net/wireless/realtek/rtw88/rtw8821cu.h | 10 + drivers/net/wireless/realtek/rtw88/rtw8822b.c | 19 + .../net/wireless/realtek/rtw88/rtw8822bu.c | 90 ++ .../net/wireless/realtek/rtw88/rtw8822bu.h | 10 + drivers/net/wireless/realtek/rtw88/rtw8822c.c | 24 + .../net/wireless/realtek/rtw88/rtw8822cu.c | 44 + .../net/wireless/realtek/rtw88/rtw8822cu.h | 10 + drivers/net/wireless/realtek/rtw88/tx.h | 31 + drivers/net/wireless/realtek/rtw88/usb.c | 918 ++++++++++++++++++ drivers/net/wireless/realtek/rtw88/usb.h | 107 ++ drivers/net/wireless/realtek/rtw88/util.c | 103 ++ drivers/net/wireless/realtek/rtw88/util.h | 12 +- 32 files changed, 1655 insertions(+), 38 deletions(-) create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723du.c create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8723du.h create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8821cu.c create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8821cu.h create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822bu.c create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822bu.h create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822cu.c create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822cu.h create mode 100644 drivers/net/wireless/realtek/rtw88/usb.c create mode 100644 drivers/net/wireless/realtek/rtw88/usb.h -- 2.30.2