From patchwork Sat Aug 5 09:17:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiji Yang X-Patchwork-Id: 712340 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 46009EB64DD for ; Sat, 5 Aug 2023 09:17:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229965AbjHEJRw (ORCPT ); Sat, 5 Aug 2023 05:17:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbjHEJRs (ORCPT ); Sat, 5 Aug 2023 05:17:48 -0400 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01olkn2078.outbound.protection.outlook.com [40.92.98.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFA72E70 for ; Sat, 5 Aug 2023 02:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VjaYd+Y+pEx7b+38qv/+TjTr9zFYjo7OB9YmUO3NbGoGc753k97Fhogfy0VipAYBI7ZQSoc58n3vz95t6NSLadcazHtrqWkZFNSgEmpP1VBikVPhHzQ3Q80QCOj67Cd/fnSHOEoNFNn8IvyDfwUKj5aUrQHAy6BiKaGdfCKwQpn5faAy6Sd9HQU0R4AaopkJzamF2wAyJkuBEoa2PkMKZVCEDqLraT2d3YGT19MbE/HF4IwCPhwX5fB/hQe+Qp1ItFi9D/FJbW0+5OeR8jq8fIvG0bqvoWuebSTjKR4+KdHF2jFNgX7omqHpxa3BSiw6ZvAppK3TYhECFJRzkhw79g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EFf3yau7bKxqaoO70B4eNoG0yOCRBlmBDWDXfaS9Zb0=; b=m9HfAtOT3HSmnJu144ZLjM/dNKM1Yz+IIiBSbZ8m0zCUePkBYdt9t0F+lKe7uhXv0/MZKH34MVZWqTzkgzJcVKgmNFdTcPlAL/KW1wb3xMeLzKQj60nAEysdOZnJZbcE19Z/4tOCwD+N7dXWe6r6tKhex71EGx+5CuBtKv9fuEJyzYLyrfEjMG2b1yTxH1zSdJBWFr+e1MhumkT6lVQKDJbOiErgr6nqqfHC7I0CtpXuV7GHIqDpruvtjysugnxqpm1TfmIkDBWSo7dBGsTNl08Zic0X7xsjZ5LWWSWgm9l+0bUwcv2uzjkiYDxAuvjf30L4zSpcpg2jchgYTaFRGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EFf3yau7bKxqaoO70B4eNoG0yOCRBlmBDWDXfaS9Zb0=; b=d+zrFbIfLwqWES+iIE5u1hWKBXG/b11+gVAgCY20uHxCKTYeMhxNyGCnNo2qCqbb9S1X90QZwa+QURQUgu7B3p4IK3MYExRhZhdTKuuvm0SurzfmJFVB03RRRWCh+wx1njC5uDx6lcLHeZsBiboXQFp7ep68Vq5uAnm9tzT4XG9HsripLmpZ62eaXf6UkeRTSo62LLzhYLomARZEn9P+vnBW+vWUF4KlfGfO2k7h1ohtnU7uy3/sUWmrBo6I3VOzT9yKWbRZHRThKTl7Ex+Akv1OvXfYBYaLLpLE+xsJNsQvNdxkOLWOsi0TKcj+1V+6B3ddCMsQjgZ/BP5HZq6d6w== Received: from TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:8041::8) by TYTP286MB3450.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:39b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.22; Sat, 5 Aug 2023 09:17:44 +0000 Received: from TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM ([fe80::f4c2:4b38:d074:f1e9]) by TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM ([fe80::f4c2:4b38:d074:f1e9%5]) with mapi id 15.20.6652.022; Sat, 5 Aug 2023 09:17:44 +0000 From: Shiji Yang To: linux-wireless@vger.kernel.org Cc: Kalle Valo , Stanislaw Gruszka , Helmut Schaa , Shiji Yang Subject: [PATCH] wifi: rt2x00: correct MAC_SYS_CTRL register RX mask in R-Calibration Date: Sat, 5 Aug 2023 17:17:28 +0800 Message-ID: X-Mailer: git-send-email 2.39.2 X-TMN: [uJ2IW0sbutGRYTcWs5dSIvZZmEkmhZmF5WNIeR/IplA=] X-ClientProxiedBy: TYCP286CA0336.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38e::7) To TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:8041::8) X-Microsoft-Original-Message-ID: <20230805091728.6332-1-yangshiji66@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYAP286MB0315:EE_|TYTP286MB3450:EE_ X-MS-Office365-Filtering-Correlation-Id: 30c9d2ee-1109-4485-ade6-08db9594d39c X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqDXAFQI1bv+JXMVFoi/4FuFyMHTdzd1YIUFPoDCYp87aI14vVxxw/J5YcdLAPgSTRcRj5uSt0p83YJoyotkaIXPyePEPek8WACvF4DnkwC2a8vXwZouIMVEzJwWlYJAP8qeh+2Tg7qrNaSNzWSZ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d8vMWW3D2xq8hvcHHxqXYMDeYjr9WKqj7V6ClcNpaZBzJfyYsu3MG8IsrV5Bh41mMxSi3l6Ta33dtGzcM7TwycPfU3VJyRoSCv/j5geuU9LH7MF1EKP/fUYicGtHgNDzEnXy+vCG4XB3tQIufywz9D6u/f6XlZ3Gt+tqw4K/mF89SNOvG1BVTUEtyORIAFMg9CN9UX8Qjysf2MBXCFKbjRRgJOEFKhtkJT5z0yszjxOWtMcq6i9tYBNyPkdcfXhoKQHG2jNe0yU8VhLKXL7uTeVueFyumaCt8hhTsDDFzwanEjjS1dzYM9QPqVxFEPnrmMGqKPE6/aoLLndf83VbuwVKmyv27qNE666tvtGFfP6L6s7ce6HsqLjyO50NPE2jmZ20f5vIVB8yyq+a2LZUd2ZfcgI4lvHiXmgXPLr0luofipdtJbIN1dNMW0bzSRmVy889Rv4= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30c9d2ee-1109-4485-ade6-08db9594d39c X-MS-Exchange-CrossTenant-AuthSource: TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2023 09:17:44.6783 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYTP286MB3450 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org For MAC_SYS_CTRL register, Bit[2] controls MAC_TX_EN and Bit[3] controls MAC_RX_EN (Bit index starts from 0). Therefore, 0x08 is the correct mask for RX. Signed-off-by: Shiji Yang --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index ff891353c..28d7b4ea4 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c @@ -8583,7 +8583,7 @@ static void rt2800_r_calibration(struct rt2x00_dev *rt2x00dev) rt2x00_warn(rt2x00dev, "Wait MAC Tx Status to MAX !!!\n"); maccfg = rt2800_register_read(rt2x00dev, MAC_SYS_CTRL); - maccfg &= (~0x04); + maccfg &= (~0x08); rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, maccfg); if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev, MAC_STATUS_CFG_BBP_RF_BUSY_RX)))