From patchwork Thu Apr 7 07:51:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jimmy Hon X-Patchwork-Id: 559171 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 C612BC433FE for ; Thu, 7 Apr 2022 07:52:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242311AbiDGHx6 (ORCPT ); Thu, 7 Apr 2022 03:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242283AbiDGHxz (ORCPT ); Thu, 7 Apr 2022 03:53:55 -0400 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8B5E1342F0 for ; Thu, 7 Apr 2022 00:51:56 -0700 (PDT) Received: by mail-oi1-x235.google.com with SMTP id r8so4863429oib.5 for ; Thu, 07 Apr 2022 00:51:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KgQ1ywg+ba/yQzHZ4Pvp9X9bnupFWJ5qxG8MURjAQ8s=; b=ai19JJrPJMlFSfCz2C9gQTi5UakFxWlunwlYkARXVeayQbFo8nLmHzAOuKrEenQuQy wIqF0qrfWRHYb4dDweucMO3A4Y2a0Y0VZgRCEVvlaEMg2EylhrQDR9/YBDHBlvmEBc3a N34xMYmEXKIuWt+PDcs+4Rs5jXzWB731HJLPawdFNSSzpl2kds5PwUy2riiEMraF/xZv //7JE9JETXZ0t1SmpQ8HsoCML/Ow88tKDxzGeoLd5Bl3BmiMk4SmfTH43hLFFKo2hOm7 mZBU6guoZq+u/FqOtYSKNOawXkdAgK5Kntc+cJXofmbkr0dY0L8mPc5ItH76m0qYnspO jMaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KgQ1ywg+ba/yQzHZ4Pvp9X9bnupFWJ5qxG8MURjAQ8s=; b=I9wnHN+SOtVonwltAta1bd+PoA9DBXCmLjbdTwRu3dO4XOMflzt4B9WO0lCcXn2PiQ wJCizmZt6Hxg7it0d0hLMQtAvdNyU5KvbJEFhIU/dWV/uiLXAhBRMQL54IpxaRHiPRej d9kNwIDGceQEfzuUam0sT72PecaXnd5VUAtN3X9ssYtLKJ8Up5XsLQHgqQDHfMcSOna0 Uqg6yqADPOZAGbdxR5BrXllXp97awV/SmCM7dsUbAlXv354g4ToQnQ2vmQcVTvhALl5E H0n22j0fIJQtFKQKfIYNocsKJcu1Ogsm3JM3nx16gHUNvlxF9OeP/QiFeuuUdmsgrex6 +HNQ== X-Gm-Message-State: AOAM530lCZUL/yMSn4hC36lfN+JhTEqYGMz1+uq53WRZIQP4zpZ4QKaG Lpgh8Q3EF0wsbQ+bCmXdeKinS83LfcA= X-Google-Smtp-Source: ABdhPJyOxaSJwiK83floiNamfccAuz3h5iK7fzmzQj4pBqyqXQpKUDsqICEQT+8fboQv/vCrumVvOw== X-Received: by 2002:a05:6808:144a:b0:2ef:9fa2:ba7f with SMTP id x10-20020a056808144a00b002ef9fa2ba7fmr5064826oiv.88.1649317916334; Thu, 07 Apr 2022 00:51:56 -0700 (PDT) Received: from tower.austin.rr.com (cpe-68-203-212-228.rgv.res.rr.com. [68.203.212.228]) by smtp.gmail.com with ESMTPSA id v13-20020a4ae6cd000000b00328882a2388sm6906245oot.14.2022.04.07.00.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 00:51:55 -0700 (PDT) From: Jimmy Hon To: tony0620emma@gmail.com Cc: linux-wireless@vger.kernel.org, Jimmy Hon Subject: [PATCH 1/2] rtw88: 8821ce: add support for device ID 0xb821 Date: Thu, 7 Apr 2022 02:51:22 -0500 Message-Id: <20220407075123.420696-2-honyuenkwun@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407075123.420696-1-honyuenkwun@gmail.com> References: <20220407075123.420696-1-honyuenkwun@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org New device ID 0xb821 found on TP-Link T2E Tested it with c821 driver. 2.4GHz and 5GHz works. PCI id: 05:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b821 Subsystem: Realtek Semiconductor Co., Ltd. Device b821 Signed-off-by: Jimmy Hon --- drivers/net/wireless/realtek/rtw88/rtw8821ce.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821ce.c b/drivers/net/wireless/realtek/rtw88/rtw8821ce.c index f34de115e4bc..56d22f9de904 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8821ce.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8821ce.c @@ -8,6 +8,10 @@ #include "rtw8821ce.h" static const struct pci_device_id rtw_8821ce_id_table[] = { + { + PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xB821), + .driver_data = (kernel_ulong_t)&rtw8821c_hw_spec + }, { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xC821), .driver_data = (kernel_ulong_t)&rtw8821c_hw_spec From patchwork Thu Apr 7 07:51:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jimmy Hon X-Patchwork-Id: 558780 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 AEAA3C433EF for ; Thu, 7 Apr 2022 07:52:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242298AbiDGHyE (ORCPT ); Thu, 7 Apr 2022 03:54:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230269AbiDGHyB (ORCPT ); Thu, 7 Apr 2022 03:54:01 -0400 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FE69123BEB for ; Thu, 7 Apr 2022 00:52:03 -0700 (PDT) Received: by mail-oi1-x236.google.com with SMTP id w127so4835798oig.10 for ; Thu, 07 Apr 2022 00:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t96OkOU3FEohAgs5/29zf4S1G5FFjYOOGwf94z7wQOo=; b=QkGVPH/QdkkoQwehITwTQHlCJOCdMCNUpsm5nxJz8W7L6ToKskxqlZtvW+srY8LE/S Jsoq/rOGJNg7WaHbQuiJjLOhoVQJOHr6MD2m3fji9rpPz3p9bFbncTKzvq/FA65yd6id 3cfvbLbv7OFH5Fgz8hSNiivPSJfZOsEMW5YrNQMplcBADjwtDW0Pyx1G6Vv9nSZ3JYIl Aml+hJY7hSJb/wo7QdRaBzys0EYtRfwEc2WfDHpm4W0fgmhmkfYkrgywdY9Jon/9u4d1 sNkC7jWSSuYzAotcfnNMsOdv8wPU1T0bgY2OZ5wDGiM3hJp7233X1SrXr+Hdhqt5waUy rWfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t96OkOU3FEohAgs5/29zf4S1G5FFjYOOGwf94z7wQOo=; b=dfS48sVnjppV6+i0e0UUUztLpo6YCKI0CnIz0L3PtRidIgEz+FHmMkjp1GxNTyUP5s nI/HRQBMz2c0+PbG+xqbLfROMrzeGRYwYVAEqV+XnKW8WHpFAfFf6nMSHxdNx+bwXQ9+ hodMqChVOkFvBICnQu3Gfr6PIZ+FXClhB6etylCQyKopya/zn7dlxuD5E7LCHLw0tePR K7K11IeNecx90HlV4tl1J41nWxlSCdpLMu+wxEuHU+L2EhIWd1IvVsr1QsUEEn7KWcDA yANUPPiVQAXgqcs86atUVC3+ni3HIylDfwQOApjSmP/w3+3+R7BhSpqA11XTi8vIW4uA dlFg== X-Gm-Message-State: AOAM5323wJ2kbn0AtEJ8MlJtlpMxAfLLnFko8r8pl/tJ9scppWXJw1J3 O9zg+6XhOB+xFVJkZpPAbkSg036IJ38= X-Google-Smtp-Source: ABdhPJzwMAdQS5845Ahd6XfwXIbgNMnrqDUrv83Fg57KjDJTf4Axl8O+I6fBjg7UTFTuGB1Y6+1+6A== X-Received: by 2002:a05:6808:1798:b0:2ef:97d1:c7e4 with SMTP id bg24-20020a056808179800b002ef97d1c7e4mr5308340oib.215.1649317922456; Thu, 07 Apr 2022 00:52:02 -0700 (PDT) Received: from tower.austin.rr.com (cpe-68-203-212-228.rgv.res.rr.com. [68.203.212.228]) by smtp.gmail.com with ESMTPSA id v13-20020a4ae6cd000000b00328882a2388sm6906245oot.14.2022.04.07.00.52.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 00:52:01 -0700 (PDT) From: Jimmy Hon To: tony0620emma@gmail.com Cc: linux-wireless@vger.kernel.org, Jimmy Hon Subject: [PATCH 2/2] rtw88: 8821ce: Disable PCIe ASPM L1 for 8821CE using chip ID Date: Thu, 7 Apr 2022 02:51:23 -0500 Message-Id: <20220407075123.420696-3-honyuenkwun@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407075123.420696-1-honyuenkwun@gmail.com> References: <20220407075123.420696-1-honyuenkwun@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Make workaround work for other 8821CE devices with different PCI ID Signed-off-by: Jimmy Hon Reviewed-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw88/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c index a0991d3f15c0..0edb5711b546 100644 --- a/drivers/net/wireless/realtek/rtw88/pci.c +++ b/drivers/net/wireless/realtek/rtw88/pci.c @@ -1770,7 +1770,7 @@ int rtw_pci_probe(struct pci_dev *pdev, } /* Disable PCIe ASPM L1 while doing NAPI poll for 8821CE */ - if (pdev->device == 0xc821 && bridge->vendor == PCI_VENDOR_ID_INTEL) + if (rtwdev->chip->id == RTW_CHIP_TYPE_8821C && bridge->vendor == PCI_VENDOR_ID_INTEL) rtwpci->rx_no_aspm = true; rtw_pci_phy_cfg(rtwdev);