From patchwork Mon Apr 17 14:03:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 674492 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B709C77B70 for ; Mon, 17 Apr 2023 14:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230117AbjDQOEh (ORCPT ); Mon, 17 Apr 2023 10:04:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230280AbjDQOEe (ORCPT ); Mon, 17 Apr 2023 10:04:34 -0400 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 71E6F5B9B for ; Mon, 17 Apr 2023 07:04:03 -0700 (PDT) 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 1poPSb-000482-ET; Mon, 17 Apr 2023 16:04:01 +0200 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 1poPSa-00BtJv-On; Mon, 17 Apr 2023 16:04:00 +0200 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1poPSZ-009Or6-Ka; Mon, 17 Apr 2023 16:03:59 +0200 From: Sascha Hauer To: linux-wireless Cc: Hans Ulli Kroll , Larry Finger , Pkshih , Tim K , "Alex G ." , Nick Morrow , Viktor Petrenko , Andreas Henriksson , ValdikSS , kernel@pengutronix.de, Sascha Hauer Subject: [PATCH v3 0/4] RTW88 USB bug fixes Date: Mon, 17 Apr 2023 16:03:54 +0200 Message-Id: <20230417140358.2240429-1-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.39.2 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-wireless@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Third round of the RTW88 USB bug fixes. After some discussion and thinking I came to the conclusion that the v1 variant of "wifi: rtw88: rtw8821c: Fix rfe_option field width" is better than the one posted in v2, so I reverted back to this version, but added a note to the commit message why this might not be entirely correct for all chip variants (though for all variants currently supported in the driver). The patches are sorted in order of importance. 1/4 hasn't seen any negative comments and I think it should be applied right now. As stated above I think 2/4 should be applied as well. 3/4 fixes something I stumbled upon while reading in the vendor driver, but I don't what effect it actually has, I didn't notice any change in behaviour of the driver. 4/4 straightens the logic how rtw8821c_switch_rf_set() is called for different variants of the rtw8821c. This is taken from the vendor driver. From the supported chip variants this should only have an effect on the ones with rfe_option = 6, but I don't have that one available here for testing. I would be glad if at least 1/4 and 2/4 could be applied as these fix real issues in the driver. Sascha Sascha Hauer (4): wifi: rtw88: usb: fix priority queue to endpoint mapping wifi: rtw88: rtw8821c: Fix rfe_option field width wifi: rtw88: set pkg_type correctly for specific rtw8821c variants wifi: rtw88: call rtw8821c_switch_rf_set() according to chip variant drivers/net/wireless/realtek/rtw88/main.c | 2 +- drivers/net/wireless/realtek/rtw88/main.h | 2 + drivers/net/wireless/realtek/rtw88/rtw8821c.c | 25 +++++-- drivers/net/wireless/realtek/rtw88/usb.c | 70 +++++++++++++------ 4 files changed, 69 insertions(+), 30 deletions(-) Reviewed-by: Ping-Ke Shih Reviewed-by: Ping-Ke Shih