Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp898585rwd; Sun, 14 May 2023 08:28:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ54+gyNTADLbkxb3zhy7HNxx1Bmv0tPKCg78ZZNSGgy+G9gat54g3am5THtIw0DU7tXo3XG X-Received: by 2002:a05:6a20:4423:b0:100:6a95:c287 with SMTP id ce35-20020a056a20442300b001006a95c287mr34216962pzb.14.1684078099147; Sun, 14 May 2023 08:28:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684078099; cv=pass; d=google.com; s=arc-20160816; b=y3GQBpSOx/R3YPYqE02IxUMRBFJYLqcUKrMcDgX3s4krbAGDAttdPVB4WcUtWevpnM IMTXJBgAdYhU3mX8/skLzqTUl5YBCvul5wbyzVDfHUwd+4zlXXIXL7qkzzr6apBjvVro Irhgkvk51oC//CHRTQiB5C0QEZdldSKzTz3MVe0L4aDB2PyoOvGXjyFz6VUn4FOXRmhH K4LPlox68XF7XZwWwZll2co/QsNOwINQLlAjWQywYrL8Kcoqj6vdz08zFpAISKkb3JTU A5beShhhW5TL41ZBRIpeIe4Ie3lBUWQDOwwwvgo6GbwbyETJcl5PEVIGZwaNGxs72PwH RzsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qMREUABHnaPWngenBShsQc3oR+mUksp7gIghNXBzQwo=; b=mJyM9n7nO0mnhNsZ0YxqJiJedB1PvLDxs/cQ4tfGGI0TZlIp6Ee04HCR0/8cMP64Fm NgXB0oQEhCSxjktuQWNBovsy1UHoXnO0pd9BEhzhNM+RdQ/tfxwAqOnG5yoyF1KRij62 j+FfVCc3OD37jAHzkCYjgCW+0ywRqOFPhf9YYCBdXGcdk+ysZGy1jZEdva3abAY3hjFP PH7HLPswVNdzk/7sethilnl56wfSnPaCBhKPXzY0w1OB1Xq/oXU6NEPcBlONrJgmCHet pZ72s3P0X+XPMQKq+G+zJSfdttHpUZ11X3PYBpjFWKawGW9IVJX7ROMMVflZ17JnYGC0 OCZw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=EzCHWLXJ; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a637047000000b00524b02cbbc9si6707661pgn.835.2023.05.14.08.28.03; Sun, 14 May 2023 08:28:19 -0700 (PDT) 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; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=EzCHWLXJ; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233771AbjENOx6 (ORCPT + 61 others); Sun, 14 May 2023 10:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjENOx4 (ORCPT ); Sun, 14 May 2023 10:53:56 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2123.outbound.protection.outlook.com [40.107.92.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56CB110C; Sun, 14 May 2023 07:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dN926IkbrOK8N0Kvyf/7X3iZCNnKXBB+Zyz9LW4WvQIpxEpRCmjdltEpqz94ddwqqhtE5X8ksrS0gT2yNeQ59RNNpOKInRrCS/kuo+Uj6Onsa9L+1VSLvS589ss4T7d63tn0Pon8h09KKlmkU9wG/1eskmP1TLQ/nHN2pd8hppOdKwcOvG97whYBPspOGBTxPnjKbGa06iinjCX4j5ivpYHPzYXnMp8ngGpHIU2T2RwQfxjuiQdoRDDZM8x3yo5cWnynN6Cm1vNDyssD13D1b93JdLin5G5btDFNIMFjRQuxCczPzRuBitCnasJtGEGpdgDGc/ycNV7DlkbUkFzAnw== 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=qMREUABHnaPWngenBShsQc3oR+mUksp7gIghNXBzQwo=; b=dWBeS+r6MAv3LpOsjmbf0H7qbWnyCulRKn+PLVBBefdUpHRlgBnyavZkUeDTJQBZ2DMcovTwL3PFFeCXA7aC2PW/fZprD1kam8UABlX6rj5qKzMyPDemjIbrPOtGQyF1ql8AyqlwvP92bVv6XgRYcDbMOJ8EN08Ue8a8YEjTLEcBLrlyeyE9ZGu7pBF5JJlFAC3XFR2gXHi3ntJ22Mql99xOvm3evakke1lItSQpnvQs4y4+TTo59hsqQH2AOdp9n0enYE7x2PAeagpGdKwnBViYDdlGnU58q2bp1u/qo4B/N78+gxKo5CD6gA+9fpK3TDH8jr7UgzP1sNBscdZcIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qMREUABHnaPWngenBShsQc3oR+mUksp7gIghNXBzQwo=; b=EzCHWLXJUJv2UKYVzC+ucPNWeAsTn3ArCt7YXNNb/U++vLhSld2EZN/SF4IG86YITiCTuCOKxT8+kWBQoSCeBekccyAPApaPsjudVmjjITFTMzgJdFPah4cAUlFlRiRLk0jN7C4V3IfPiok9/jyLCmAIP1lyYBg+Da8KuL7WqE8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by DM6PR13MB3690.namprd13.prod.outlook.com (2603:10b6:5:24e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.29; Sun, 14 May 2023 14:53:52 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34%5]) with mapi id 15.20.6387.029; Sun, 14 May 2023 14:53:52 +0000 Date: Sun, 14 May 2023 16:53:43 +0200 From: Simon Horman To: Daniel Golle Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Alexander Couzens , Sujuan Chen , Bo Jiao , Nicolas Cavallari , Howard Hsu , MeiChia Chiu , Peter Chiu , Johannes Berg , Wang Yufen , Lorenz Brun Subject: Re: [PATCH] wifi: mt76: mt7915: add support for MT7981 Message-ID: References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: AM0PR02CA0136.eurprd02.prod.outlook.com (2603:10a6:20b:28c::33) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|DM6PR13MB3690:EE_ X-MS-Office365-Filtering-Correlation-Id: 441c59d8-3042-40a3-1434-08db548b0860 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g7layZOEY94D6GeIg0AOF0jSu13zG7tWuYrpqWbaaVuP+LWwZvu4eAmtwGbYM2AghfYSw6M54KTKQUa2410YxjzJ/L0L0pUTtTjAOnM0w2mEiwnCOx01cBdNDQJMM5+OAOqYdQHtL/Xd156V6krw7kaneUYFRuZC+Zv7Df4s833/y7riqq6aMI9wZ67JTs9AdRt9S0sPgBV/3ojxdNNsmn7v7aCprkAxmeuAHLllT+ShPZ+fyfxlFtcbz8rOTISLWkD+BBgJwg4qfgLZOxav1JXgtIqZC/ENr32HBG09GVzrhbqoHnrOTMMpD3GOSd/y/LKZfEEj3k9Prx/KbJlFJB5dwgAMuDCNaDqy2fpuFgA5ZBGfrujX9mgKX0sV8m5jrIPRFuYkvzzu4K3g23eLInk5BpbhBs9FWQLsocdaGzwINGmggBGbM8B2o/gM+wV+gZu3geu1Oewa8eJoPI8DwjmM3WTmHMNBsd9/Y7DacZyjIf4XvOH4H9jrl5sypjnUv2mdfU3a5kPbLiFp1qtPGAdkB92iUJbwnNm6Ctci9GXmjuD6kUguw7HXMXORNfWN X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(376002)(39830400003)(366004)(136003)(451199021)(66556008)(6916009)(66946007)(66476007)(4326008)(478600001)(6486002)(86362001)(316002)(54906003)(36756003)(6512007)(186003)(2616005)(6506007)(41300700001)(8936002)(8676002)(5660300002)(44832011)(7416002)(6666004)(2906002)(4744005)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?fdATbZspMpbMzBv2NDt0pATp7UmmpPJe2KtS0XB9cR9GeGWdEZhTYeizAxY7?= =?us-ascii?Q?eb0CwCR7ogFTtCHyJCikx2Zde7dqmGaUq8mfX8b8c/OvhGG6ol5jDS+7UV/p?= =?us-ascii?Q?h+mjxE9SbVvUoEMqNZsTa+KPHJTVkKG0S6Tpl5XEbkChG6DOTEq4WDDK3K37?= =?us-ascii?Q?rNHoq3wcrKFgk1xxuxjtltK1CsQcaYbsYmm42/G9hdWSzvqvaZFave4a87oK?= =?us-ascii?Q?qpt6Mqp8RhQ7GG0DdVrBRkCi8QmExbz165uzSaQU3EkDCWvs3Y2wuQYTi9eJ?= =?us-ascii?Q?/1Xh2n51wMDwA/llA47QZJ3Royo36+V8xONcbLpm5Xgm39Bx0LDBxGv9dk1I?= =?us-ascii?Q?A9hj06ZrvbzdtXbZkfiLDUIdvrI+6DQGtRXuhLJDF+xGN6o0A3y4anuKimqy?= =?us-ascii?Q?af0CjZlJI/+iih90NiE5/BPGl2hPxcChM43rcKA5E+YErF0UFMFE/5lX0bNR?= =?us-ascii?Q?OGe+tlsWJKNYhjFP0qPyQTv0d6uf2kjNci9nILntX5H22jZOdniXHHKrSHv3?= =?us-ascii?Q?NdLXIU3gvLMstBE8YzNQJRYkJd7EFWmKDBmzjhw0kd3Zcd8QiygxL3xWHToM?= =?us-ascii?Q?sAV1qN23Xp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us-ascii?Q?6haJK9kr9MefD2xIoYQ9QsPmDoiyUsrSsN2/f33YGEwW4iBVVHktKPSBZ3Fy?= =?us-ascii?Q?5dkW8oF9qizqGGsnU/nJ/9YtWktSM8Zkj7DRdrWkVA1PYchp7XTc9LEu7GRY?= =?us-ascii?Q?Q8VyU669XR+5HAyO+mG+aA4JYgR1N1bGFqgKEC5zbX4StGoudW+nReTknQDc?= =?us-ascii?Q?vWNExw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 441c59d8-3042-40a3-1434-08db548b0860 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2023 14:53:52.3084 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SHKVQTvLysa47nyCDqwc21RlVRA3uKNdGNHZ82w3BpYakrucX79sTvgKpFBu6RIyX0uNHTZRjSk86dxhcrIYXc+Ml1g6NuqQSQb2zpdAYcw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB3690 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Sat, May 13, 2023 at 03:35:51PM +0200, Daniel Golle wrote: > From: Alexander Couzens > > Add support for the MediaTek MT7981 SoC which is similar to the MT7986 > but with a newer IP cores and only 2x ARM Cortex-A53 instead of 4x. > Unlike MT7986 the MT7981 can only connect a single wireless frontend, > usually MT7976 is used for DBDC. > > Signed-off-by: Alexander Couzens > Signed-off-by: Daniel Golle ... > @@ -489,7 +516,10 @@ static int mt7986_wmac_adie_patch_7976(struct mt7915_dev *dev, u8 adie) > rg_xo_01 = 0x1d59080f; > rg_xo_03 = 0x34c00fe0; > } else { > - rg_xo_01 = 0x1959f80f; > + if (is_mt7981(&dev->mt76)) > + rg_xo_01 = 0x1959c80f; > + else if (is_mt7986(&dev->mt76)) > + rg_xo_01 = 0x1959f80f; Hi Daniel, rg_xo_01 will be used uninitialised below if we get here and neither of the conditions above are true. Can this occur? > rg_xo_03 = 0x34d00fe0; > } > ...