Message ID | 20221122145226.4065843-1-s.hauer@pengutronix.de |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2252763wrr; Tue, 22 Nov 2022 06:56:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf6GQKKmqRqmU1pI2cy4CBQcr3GHM1TmxkJGds46v83RXOzENFl3WvPQt8EApJCdygELr9eA X-Received: by 2002:a17:906:158f:b0:78d:45e9:97be with SMTP id k15-20020a170906158f00b0078d45e997bemr19236504ejd.565.1669129004636; Tue, 22 Nov 2022 06:56:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669129004; cv=none; d=google.com; s=arc-20160816; b=LYgnWjSaxMJhZZolOrS0CEEBeUue4sEfy4dKu6qEVpjITnSLC7aKcEXZfjGjIKnWaJ ZkvDDa6sFX5o7N2770umJV5KiN+HQMZ0rbpBRqsCASXX8++PjWE0TVlrJ7ajbspawiEp fgLLdQKL96lMtHiDzTWftmPDWt9bxVl/8KZi1kK/6Uu7rVcs/uQHf1sc1gtEJGeAD6Ke dFS/hI2TIKnhKeOfpFhU800gy6tsqya4GMgHWUUb2i0TcYhYWJ0Ha+rF/QkSeisoJqBs B00a8rDdnMO0HWgCB9zyfAaIx21iBMHgCqFickrRfm3ds0GshnfKXnFQwaH1icyadnWd I/wA== 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=dVqmlQ+aHrdGnnNyT5WiHQUnubcPub/It6gj7BkqeZERoFDpcspOV0UsevyHS+v5gO weD5I50QlAYHovPyDUBATVIu0ybrEdJQeWPcKvZladD3F9x7GYiJmYKrRQblxhivDAXY Ayn7ZeU3Qphc/fisBnPYDfwL2bRYc0RRYN1cGoISsOp87bFXRwvqWA2+GNbUlJG090eB TH3jsGE3W7SbSNN6duHzMNQ/5nKXrdeMZ89g8OwS29RGHUENYAxUSdxT1SGNlvdS+g+n JFtvc0YdDxsTVJw6heoUn+sWo51fW68ahuIRroRbyYuL77FySb9YM/HfKMAmSlU1/E5E kUBg== 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 hg4-20020a1709072cc400b0078dc3cb8b48si12746640ejc.625.2022.11.22.06.56.20; Tue, 22 Nov 2022 06:56:44 -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 S233909AbiKVOx5 (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Tue, 22 Nov 2022 09:53:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233718AbiKVOxD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 22 Nov 2022 09:53:03 -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 E925BBF51 for <linux-kernel@vger.kernel.org>; Tue, 22 Nov 2022 06:52:55 -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 <sha@pengutronix.de>) 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 <sha@pengutronix.de>) 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 <sha@pengutronix.de>) id 1oxUdX-00H3kU-I2; Tue, 22 Nov 2022 15:52:35 +0100 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, Johannes Berg <johannes@sipsolutions.net>, Alexander Hochbaum <alex@appudo.com>, Da Xue <da@libre.computer>, Po-Hao Huang <phhuang@realtek.com>, Viktor Petrenko <g0000ga@gmail.com>, Sascha Hauer <s.hauer@pengutronix.de> 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-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750208615367935335?= X-GMAIL-MSGID: =?utf-8?q?1750208615367935335?= |
Series |
RTW88: Add support for USB variants
|
|
Message
Sascha Hauer
Nov. 22, 2022, 2:52 p.m. UTC
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
Comments
On Tue, Nov 22, 2022 at 03:52:15PM +0100, Sascha Hauer wrote: > 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. There still is a problem with the RTL8822cu chipset I have here. When using NetworkManager I immediately lose the connection to the AP after it has been connected: [ 376.213846] wlan0: authenticate with 76:83:c2:ce:81:b1 [ 380.085463] wlan0: send auth to 76:83:c2:ce:81:b1 (try 1/3) [ 380.091446] wlan0: authenticated [ 380.108864] wlan0: associate with 76:83:c2:ce:81:b1 (try 1/3) [ 380.136448] wlan0: RX AssocResp from 76:83:c2:ce:81:b1 (capab=0x1411 status=0 aid=2) [ 380.202955] wlan0: associated [ 380.268140] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 380.275328] wlan0: Connection to AP 76:83:c2:ce:81:b1 lost That doesn't happen when using plain wpa_supplicant. This seems to go down to cd96e22bc1da ("rtw88: add beacon filter support"). After being connected I get a BCN_FILTER_CONNECTION_LOSS beacon. Plain wpa_supplicant seems to go another code patch and doesn't activate connection quality monitoring. The connection to the AP works fluently also with NetworkManager though when I just ignore the BCN_FILTER_CONNECTION_LOSS beacon. Any idea what may be wrong here? Sascha
> -----Original Message----- > From: Sascha Hauer <s.hauer@pengutronix.de> > Sent: Tuesday, November 22, 2022 10:55 PM > To: Bernie Huang <phhuang@realtek.com> > Cc: linux-wireless@vger.kernel.org; Ping-Ke Shih <pkshih@realtek.com>; Hans Ulli Kroll > <linux@ulli-kroll.de>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>; netdev@vger.kernel.org; > Kalle Valo <kvalo@kernel.org>; Yan-Hsuan Chuang <tony0620emma@gmail.com>; linux-kernel@vger.kernel.org; > Viktor Petrenko <g0000ga@gmail.com>; Neo Jou <neojou@gmail.com>; Bernie Huang <phhuang@realtek.com>; > kernel@pengutronix.de; Johannes Berg <johannes@sipsolutions.net>; Alexander Hochbaum <alex@appudo.com>; > Da Xue <da@libre.computer> > Subject: Re: [PATCH v3 00/11] RTW88: Add support for USB variants > > On Tue, Nov 22, 2022 at 03:52:15PM +0100, Sascha Hauer wrote: > > 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. > > There still is a problem with the RTL8822cu chipset I have here. When > using NetworkManager I immediately lose the connection to the AP after > it has been connected: > > [ 376.213846] wlan0: authenticate with 76:83:c2:ce:81:b1 > [ 380.085463] wlan0: send auth to 76:83:c2:ce:81:b1 (try 1/3) > [ 380.091446] wlan0: authenticated > [ 380.108864] wlan0: associate with 76:83:c2:ce:81:b1 (try 1/3) > [ 380.136448] wlan0: RX AssocResp from 76:83:c2:ce:81:b1 (capab=0x1411 status=0 aid=2) > [ 380.202955] wlan0: associated > [ 380.268140] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready > [ 380.275328] wlan0: Connection to AP 76:83:c2:ce:81:b1 lost > > That doesn't happen when using plain wpa_supplicant. This seems to go > down to cd96e22bc1da ("rtw88: add beacon filter support"). After being > connected I get a BCN_FILTER_CONNECTION_LOSS beacon. Plain > wpa_supplicant seems to go another code patch and doesn't activate > connection quality monitoring. > > The connection to the AP works fluently also with NetworkManager though > when I just ignore the BCN_FILTER_CONNECTION_LOSS beacon. > > Any idea what may be wrong here? > Please reference to below patch to see if it can work to you. https://lore.kernel.org/linux-wireless/20221124064442.28042-1-pkshih@realtek.com/T/#u Ping-Ke
On Thu, Nov 24, 2022 at 06:48:23AM +0000, Ping-Ke Shih wrote: > > > -----Original Message----- > > From: Sascha Hauer <s.hauer@pengutronix.de> > > Sent: Tuesday, November 22, 2022 10:55 PM > > To: Bernie Huang <phhuang@realtek.com> > > Cc: linux-wireless@vger.kernel.org; Ping-Ke Shih <pkshih@realtek.com>; Hans Ulli Kroll > > <linux@ulli-kroll.de>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>; netdev@vger.kernel.org; > > Kalle Valo <kvalo@kernel.org>; Yan-Hsuan Chuang <tony0620emma@gmail.com>; linux-kernel@vger.kernel.org; > > Viktor Petrenko <g0000ga@gmail.com>; Neo Jou <neojou@gmail.com>; Bernie Huang <phhuang@realtek.com>; > > kernel@pengutronix.de; Johannes Berg <johannes@sipsolutions.net>; Alexander Hochbaum <alex@appudo.com>; > > Da Xue <da@libre.computer> > > Subject: Re: [PATCH v3 00/11] RTW88: Add support for USB variants > > > > On Tue, Nov 22, 2022 at 03:52:15PM +0100, Sascha Hauer wrote: > > > 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. > > > > There still is a problem with the RTL8822cu chipset I have here. When > > using NetworkManager I immediately lose the connection to the AP after > > it has been connected: > > > > [ 376.213846] wlan0: authenticate with 76:83:c2:ce:81:b1 > > [ 380.085463] wlan0: send auth to 76:83:c2:ce:81:b1 (try 1/3) > > [ 380.091446] wlan0: authenticated > > [ 380.108864] wlan0: associate with 76:83:c2:ce:81:b1 (try 1/3) > > [ 380.136448] wlan0: RX AssocResp from 76:83:c2:ce:81:b1 (capab=0x1411 status=0 aid=2) > > [ 380.202955] wlan0: associated > > [ 380.268140] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready > > [ 380.275328] wlan0: Connection to AP 76:83:c2:ce:81:b1 lost > > > > That doesn't happen when using plain wpa_supplicant. This seems to go > > down to cd96e22bc1da ("rtw88: add beacon filter support"). After being > > connected I get a BCN_FILTER_CONNECTION_LOSS beacon. Plain > > wpa_supplicant seems to go another code patch and doesn't activate > > connection quality monitoring. > > > > The connection to the AP works fluently also with NetworkManager though > > when I just ignore the BCN_FILTER_CONNECTION_LOSS beacon. > > > > Any idea what may be wrong here? > > > > Please reference to below patch to see if it can work to you. > > https://lore.kernel.org/linux-wireless/20221124064442.28042-1-pkshih@realtek.com/T/#u Great! That solves this issue \o/ Sascha
> -----Original Message----- > From: Sascha Hauer <s.hauer@pengutronix.de> > Sent: Thursday, November 24, 2022 4:22 PM > To: Ping-Ke Shih <pkshih@realtek.com> > Cc: Bernie Huang <phhuang@realtek.com>; linux-wireless@vger.kernel.org; Hans Ulli Kroll > <linux@ulli-kroll.de>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>; netdev@vger.kernel.org; > Kalle Valo <kvalo@kernel.org>; Yan-Hsuan Chuang <tony0620emma@gmail.com>; linux-kernel@vger.kernel.org; > Viktor Petrenko <g0000ga@gmail.com>; Neo Jou <neojou@gmail.com>; kernel@pengutronix.de; Johannes Berg > <johannes@sipsolutions.net>; Alexander Hochbaum <alex@appudo.com>; Da Xue <da@libre.computer> > Subject: Re: [PATCH v3 00/11] RTW88: Add support for USB variants > > On Thu, Nov 24, 2022 at 06:48:23AM +0000, Ping-Ke Shih wrote: > > > > > -----Original Message----- > > > From: Sascha Hauer <s.hauer@pengutronix.de> > > > Sent: Tuesday, November 22, 2022 10:55 PM > > > To: Bernie Huang <phhuang@realtek.com> > > > Cc: linux-wireless@vger.kernel.org; Ping-Ke Shih <pkshih@realtek.com>; Hans Ulli Kroll > > > <linux@ulli-kroll.de>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>; > netdev@vger.kernel.org; > > > Kalle Valo <kvalo@kernel.org>; Yan-Hsuan Chuang <tony0620emma@gmail.com>; > linux-kernel@vger.kernel.org; > > > Viktor Petrenko <g0000ga@gmail.com>; Neo Jou <neojou@gmail.com>; Bernie Huang <phhuang@realtek.com>; > > > kernel@pengutronix.de; Johannes Berg <johannes@sipsolutions.net>; Alexander Hochbaum > <alex@appudo.com>; > > > Da Xue <da@libre.computer> > > > Subject: Re: [PATCH v3 00/11] RTW88: Add support for USB variants > > > > > > On Tue, Nov 22, 2022 at 03:52:15PM +0100, Sascha Hauer wrote: > > > > 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. > > > > > > There still is a problem with the RTL8822cu chipset I have here. When > > > using NetworkManager I immediately lose the connection to the AP after > > > it has been connected: > > > > > > [ 376.213846] wlan0: authenticate with 76:83:c2:ce:81:b1 > > > [ 380.085463] wlan0: send auth to 76:83:c2:ce:81:b1 (try 1/3) > > > [ 380.091446] wlan0: authenticated > > > [ 380.108864] wlan0: associate with 76:83:c2:ce:81:b1 (try 1/3) > > > [ 380.136448] wlan0: RX AssocResp from 76:83:c2:ce:81:b1 (capab=0x1411 status=0 aid=2) > > > [ 380.202955] wlan0: associated > > > [ 380.268140] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready > > > [ 380.275328] wlan0: Connection to AP 76:83:c2:ce:81:b1 lost > > > > > > That doesn't happen when using plain wpa_supplicant. This seems to go > > > down to cd96e22bc1da ("rtw88: add beacon filter support"). After being > > > connected I get a BCN_FILTER_CONNECTION_LOSS beacon. Plain > > > wpa_supplicant seems to go another code patch and doesn't activate > > > connection quality monitoring. > > > > > > The connection to the AP works fluently also with NetworkManager though > > > when I just ignore the BCN_FILTER_CONNECTION_LOSS beacon. > > > > > > Any idea what may be wrong here? > > > > > > > Please reference to below patch to see if it can work to you. > > > > https://lore.kernel.org/linux-wireless/20221124064442.28042-1-pkshih@realtek.com/T/#u > > Great! That solves this issue \o/ > Do you mind to add "Tested-by:" tag to the patch? :-) Ping-Ke
Sascha Hauer <s.hauer@pengutronix.de> writes: >> > There still is a problem with the RTL8822cu chipset I have here. When >> > using NetworkManager I immediately lose the connection to the AP after >> > it has been connected: >> > >> > [ 376.213846] wlan0: authenticate with 76:83:c2:ce:81:b1 >> > [ 380.085463] wlan0: send auth to 76:83:c2:ce:81:b1 (try 1/3) >> > [ 380.091446] wlan0: authenticated >> > [ 380.108864] wlan0: associate with 76:83:c2:ce:81:b1 (try 1/3) >> > [ 380.136448] wlan0: RX AssocResp from 76:83:c2:ce:81:b1 >> > (capab=0x1411 status=0 aid=2) >> > [ 380.202955] wlan0: associated >> > [ 380.268140] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready >> > [ 380.275328] wlan0: Connection to AP 76:83:c2:ce:81:b1 lost >> > >> > That doesn't happen when using plain wpa_supplicant. This seems to go >> > down to cd96e22bc1da ("rtw88: add beacon filter support"). After being >> > connected I get a BCN_FILTER_CONNECTION_LOSS beacon. Plain >> > wpa_supplicant seems to go another code patch and doesn't activate >> > connection quality monitoring. >> > >> > The connection to the AP works fluently also with NetworkManager though >> > when I just ignore the BCN_FILTER_CONNECTION_LOSS beacon. >> > >> > Any idea what may be wrong here? >> > >> >> Please reference to below patch to see if it can work to you. >> >> https://lore.kernel.org/linux-wireless/20221124064442.28042-1-pkshih@realtek.com/T/#u > > Great! That solves this issue \o/ Awesome, great work Ping and Ji-Pin!
On Thu, Nov 24, 2022 at 08:26:23AM +0000, Ping-Ke Shih wrote: > > > > -----Original Message----- > > From: Sascha Hauer <s.hauer@pengutronix.de> > > Sent: Thursday, November 24, 2022 4:22 PM > > To: Ping-Ke Shih <pkshih@realtek.com> > > Cc: Bernie Huang <phhuang@realtek.com>; linux-wireless@vger.kernel.org; Hans Ulli Kroll > > <linux@ulli-kroll.de>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>; netdev@vger.kernel.org; > > Kalle Valo <kvalo@kernel.org>; Yan-Hsuan Chuang <tony0620emma@gmail.com>; linux-kernel@vger.kernel.org; > > Viktor Petrenko <g0000ga@gmail.com>; Neo Jou <neojou@gmail.com>; kernel@pengutronix.de; Johannes Berg > > <johannes@sipsolutions.net>; Alexander Hochbaum <alex@appudo.com>; Da Xue <da@libre.computer> > > Subject: Re: [PATCH v3 00/11] RTW88: Add support for USB variants > > > > On Thu, Nov 24, 2022 at 06:48:23AM +0000, Ping-Ke Shih wrote: > > > > > > > -----Original Message----- > > > > From: Sascha Hauer <s.hauer@pengutronix.de> > > > > Sent: Tuesday, November 22, 2022 10:55 PM > > > > To: Bernie Huang <phhuang@realtek.com> > > > > Cc: linux-wireless@vger.kernel.org; Ping-Ke Shih <pkshih@realtek.com>; Hans Ulli Kroll > > > > <linux@ulli-kroll.de>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>; > > netdev@vger.kernel.org; > > > > Kalle Valo <kvalo@kernel.org>; Yan-Hsuan Chuang <tony0620emma@gmail.com>; > > linux-kernel@vger.kernel.org; > > > > Viktor Petrenko <g0000ga@gmail.com>; Neo Jou <neojou@gmail.com>; Bernie Huang <phhuang@realtek.com>; > > > > kernel@pengutronix.de; Johannes Berg <johannes@sipsolutions.net>; Alexander Hochbaum > > <alex@appudo.com>; > > > > Da Xue <da@libre.computer> > > > > Subject: Re: [PATCH v3 00/11] RTW88: Add support for USB variants > > > > > > > > On Tue, Nov 22, 2022 at 03:52:15PM +0100, Sascha Hauer wrote: > > > > > 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. > > > > > > > > There still is a problem with the RTL8822cu chipset I have here. When > > > > using NetworkManager I immediately lose the connection to the AP after > > > > it has been connected: > > > > > > > > [ 376.213846] wlan0: authenticate with 76:83:c2:ce:81:b1 > > > > [ 380.085463] wlan0: send auth to 76:83:c2:ce:81:b1 (try 1/3) > > > > [ 380.091446] wlan0: authenticated > > > > [ 380.108864] wlan0: associate with 76:83:c2:ce:81:b1 (try 1/3) > > > > [ 380.136448] wlan0: RX AssocResp from 76:83:c2:ce:81:b1 (capab=0x1411 status=0 aid=2) > > > > [ 380.202955] wlan0: associated > > > > [ 380.268140] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready > > > > [ 380.275328] wlan0: Connection to AP 76:83:c2:ce:81:b1 lost > > > > > > > > That doesn't happen when using plain wpa_supplicant. This seems to go > > > > down to cd96e22bc1da ("rtw88: add beacon filter support"). After being > > > > connected I get a BCN_FILTER_CONNECTION_LOSS beacon. Plain > > > > wpa_supplicant seems to go another code patch and doesn't activate > > > > connection quality monitoring. > > > > > > > > The connection to the AP works fluently also with NetworkManager though > > > > when I just ignore the BCN_FILTER_CONNECTION_LOSS beacon. > > > > > > > > Any idea what may be wrong here? > > > > > > > > > > Please reference to below patch to see if it can work to you. > > > > > > https://lore.kernel.org/linux-wireless/20221124064442.28042-1-pkshih@realtek.com/T/#u > > > > Great! That solves this issue \o/ > > > > Do you mind to add "Tested-by:" tag to the patch? :-) You should already find it in your inbox. Thank you very much for the fast response :) Sascha
On Thu, Nov 24, 2022 at 09:21:58AM +0100, Sascha Hauer wrote: > On Thu, Nov 24, 2022 at 06:48:23AM +0000, Ping-Ke Shih wrote: > > > > > -----Original Message----- > > > From: Sascha Hauer <s.hauer@pengutronix.de> > > > Sent: Tuesday, November 22, 2022 10:55 PM > > > To: Bernie Huang <phhuang@realtek.com> > > > Cc: linux-wireless@vger.kernel.org; Ping-Ke Shih <pkshih@realtek.com>; Hans Ulli Kroll > > > <linux@ulli-kroll.de>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>; netdev@vger.kernel.org; > > > Kalle Valo <kvalo@kernel.org>; Yan-Hsuan Chuang <tony0620emma@gmail.com>; linux-kernel@vger.kernel.org; > > > Viktor Petrenko <g0000ga@gmail.com>; Neo Jou <neojou@gmail.com>; Bernie Huang <phhuang@realtek.com>; > > > kernel@pengutronix.de; Johannes Berg <johannes@sipsolutions.net>; Alexander Hochbaum <alex@appudo.com>; > > > Da Xue <da@libre.computer> > > > Subject: Re: [PATCH v3 00/11] RTW88: Add support for USB variants > > > > > > On Tue, Nov 22, 2022 at 03:52:15PM +0100, Sascha Hauer wrote: > > > > 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. > > > > > > There still is a problem with the RTL8822cu chipset I have here. When > > > using NetworkManager I immediately lose the connection to the AP after > > > it has been connected: > > > > > > [ 376.213846] wlan0: authenticate with 76:83:c2:ce:81:b1 > > > [ 380.085463] wlan0: send auth to 76:83:c2:ce:81:b1 (try 1/3) > > > [ 380.091446] wlan0: authenticated > > > [ 380.108864] wlan0: associate with 76:83:c2:ce:81:b1 (try 1/3) > > > [ 380.136448] wlan0: RX AssocResp from 76:83:c2:ce:81:b1 (capab=0x1411 status=0 aid=2) > > > [ 380.202955] wlan0: associated > > > [ 380.268140] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready > > > [ 380.275328] wlan0: Connection to AP 76:83:c2:ce:81:b1 lost > > > > > > That doesn't happen when using plain wpa_supplicant. This seems to go > > > down to cd96e22bc1da ("rtw88: add beacon filter support"). After being > > > connected I get a BCN_FILTER_CONNECTION_LOSS beacon. Plain > > > wpa_supplicant seems to go another code patch and doesn't activate > > > connection quality monitoring. > > > > > > The connection to the AP works fluently also with NetworkManager though > > > when I just ignore the BCN_FILTER_CONNECTION_LOSS beacon. > > > > > > Any idea what may be wrong here? > > > > > > > Please reference to below patch to see if it can work to you. > > > > https://lore.kernel.org/linux-wireless/20221124064442.28042-1-pkshih@realtek.com/T/#u > > Great! That solves this issue \o/ I am also happy to say that this patch is a real performance boost. Here are some numbers: RTL8723DU, no patch =================== tx [ 5] 0.00-10.00 sec 1.08 MBytes 903 Kbits/sec 1 sender rx [ 5] 0.00-10.26 sec 10.3 MBytes 8.41 Mbits/sec 0 sender RTL8723DU, with patch ===================== tx [ 5] 0.00-10.00 sec 34.7 MBytes 29.1 Mbits/sec 9 sender rx [ 5] 0.00-10.05 sec 34.4 MBytes 28.7 Mbits/sec 5 sender RTL8821CU, no patch =================== tx [ 5] 0.00-10.00 sec 6.01 MBytes 5.04 Mbits/sec 0 sender rx [ 5] 0.00-10.44 sec 53.4 MBytes 42.9 Mbits/sec 0 sender RTL8821CU, with patch =================== tx [ 5] 0.00-10.00 sec 57.9 MBytes 48.6 Mbits/sec 0 sender rx [ 5] 0.00-10.15 sec 66.3 MBytes 54.8 Mbits/sec 419 sender RTL8822CU, no patch =================== tx [ 5] 0.00-10.00 sec 11.8 MBytes 9.91 Mbits/sec 1 sender rx [ 5] 0.00-10.18 sec 105 MBytes 86.3 Mbits/sec 805 sender RTL8822CU, with patch =================== tx [ 5] 0.00-10.01 sec 80.0 MBytes 67.1 Mbits/sec 0 sender rx [ 5] 0.00-10.12 sec 117 MBytes 97.2 Mbits/sec 658 sender Tested with: tx: iperf3 -c 192.168.0.57 -i0 rx: iperf3 -c 192.168.0.57 -i0 -R Especially the RTL8723DU now starts being useful. Sascha
> -----Original Message----- > From: Sascha Hauer <s.hauer@pengutronix.de> > Sent: Tuesday, November 22, 2022 10:52 PM > 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; Johannes Berg <johannes@sipsolutions.net>; Alexander Hochbaum <alex@appudo.com>; > Da Xue <da@libre.computer>; Bernie Huang <phhuang@realtek.com>; Viktor Petrenko <g0000ga@gmail.com>; > Sascha Hauer <s.hauer@pengutronix.de> > Subject: [PATCH v3 00/11] RTW88: Add support for USB variants > > 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. > Thanks for your finding and fixes on this driver. I have reviewed this patchset and written some comments. No big problem. > > 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 Please use "wifi: rtw88: " as prefix in next version. -- Ping-Ke