Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2589290rdb; Fri, 8 Dec 2023 12:34:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhqt41HVO9714PS1aSfd9cWE/2RWv7F1b8pZgH85qfG0UsxZdEV8C6RiIbFpOJVNTqVVtR X-Received: by 2002:a05:6e02:1a89:b0:35d:5995:798d with SMTP id k9-20020a056e021a8900b0035d5995798dmr880300ilv.39.1702067653920; Fri, 08 Dec 2023 12:34:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702067653; cv=pass; d=google.com; s=arc-20160816; b=JPL1yL0zP19ywFUQ86YaMEP1rROWkx+At4Ux5+KPuBVRYNsdUhmlWs6cbKrM0Z8QoU 5JD+gZ2P9k4KsL0LzF3o9ANGkXhzuL5+d/iYZwCBV4cWrSQFvABwPDCz1ycde4PZThMz pTAnuR+dVpKojwOzPd4rB719I7IxD8QmIB/hbresUafDu6gMNyLa6PjDE3mzDPgQ3Rto qx8vFbtSHtPStbee+KR0XX4IqssC6/YojLP11RaNHV2CUnSuFc6TOJOxpwpTom7yyzLK 54UsJk1S/4xME7MCLWlUwMf6UD3IiP8VjV+cgXn+g+b9zg9aHfJK1itYp2nuF2zLTbkm IA6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :in-reply-to:content-disposition:references:message-id:subject:cc:to :from:date:dkim-signature; bh=MKTFX3JFNh8IQZtE/eJcUnzCJtjR1gM/07VUJjPmbRU=; fh=zf6b60akZT1KeOeqjijQHyFTgmrMDvrun39wJ4ktiCI=; b=xiok/9ijWyJd/mgBdOFmfQZqOEiAUedotnLgLyPSB6RlZSeMVv9x2h1W5lRPRU0Vq2 1KB6yCGH136ZqdSxrOkTzY9cOENt3ocw20Owyqencqk8a+iHx6TOZN9qVLoJp1WUEZ1g 6OvZWgC+WOqsOkRy9pTS486PgZrarAvlzUmcDrSf/C9W3j+ZPaYKgNTa41yuRjLqypJ5 ERj/fph4zAboalZZdHbGE/VGfyCVlnepgkNGcspkBcvcRx5Izx5ma8iRoDXR7x6kuNV+ NEWjz5KM/eIWMaSuGTMeS+8hJjglmFEot8Rj5CLZZqN9AX5MUML//77x/s/nuei/s6Hi scHg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=Urff3LyP; arc=pass (i=1); spf=pass (google.com: domain of linux-wireless+bounces-585-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-585-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hotmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i9-20020a63e909000000b005bda1051dacsi1962516pgh.471.2023.12.08.12.34.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 12:34:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-585-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@hotmail.com header.s=selector1 header.b=Urff3LyP; arc=pass (i=1); spf=pass (google.com: domain of linux-wireless+bounces-585-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-585-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hotmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7A6792817CD for ; Fri, 8 Dec 2023 20:34:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1536E57891; Fri, 8 Dec 2023 20:34:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hotmail.com header.i=@hotmail.com header.b="Urff3LyP" X-Original-To: linux-wireless@vger.kernel.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10olkn2074.outbound.protection.outlook.com [40.92.41.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0AD31985 for ; Fri, 8 Dec 2023 12:34:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ch6DtKwIZBCwoGPwTwErbopnBbV6T6ZDLDU7EXMrGA/EoaNfO9PJ3TWara5w93Lok78FNmbG9H2cqjyqoqMUadjoTaXtfuboA0ikLPtrX844+RWiIO07vyuKPHA9bWp/XgTvIzVfChD65vg4xSdLH/AJCo6R3jVwW54Y0uCmuoIYvbw/BGLG2tyKz5G3/9FPCoP1sRAiLUS5jHmQF0y2Mfg+fP5PGE0kFXfHQTgr1l9YNq0QPxD6m3jOdciOFsUAnjrOsDNpaHkxPBlWOEAcCqgSkYtk+fwrzzNOllIKQkyMgJCIBDvkQSBZWzGkgrcDAGb5TbOq4Og0aiNxCSwLyQ== 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=MKTFX3JFNh8IQZtE/eJcUnzCJtjR1gM/07VUJjPmbRU=; b=Mi4Re+niaMXRI7WB83yocZoNaThKUzDDzJ23mhKaSfwURuAEZukpZxL0a0gBDdElRSwRCJZpcCh4RD9fBCTU+FPx9h3YVsrVG3PVxhEO+E75llpdkmeAKHt/SBi5HC7IImZhoixBnezvhx8j0YaAC7auRuBnCp5zrKq2o4FMsoG6z9xIEGEfPq5XaQkqKJLCBYNGR1JFirHR4tNR1vsttjzmcid4EOnxgIrdW8pbGlVmSXY1QfVwE56c/d7mr4X7ouEblT6+5mN6/aBltCbHQsr57DLsgIdWwG3RChxatXqXh2HAbnvNJpibMnyVTBjf+H8p+0PV7RDtHv1Sb6w6dg== 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=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MKTFX3JFNh8IQZtE/eJcUnzCJtjR1gM/07VUJjPmbRU=; b=Urff3LyPdG6Go2gu4aaPqPYNdgicHSYnFQqC7SDMNxKqyNlEFY+uV9fYtZnPuJXJS43Xcaj1LOlzyWJXG8g39dKOvimGmAvkl0fYOFtEEAPzwKSs+v4T0KKH4qxZ5vtIdz6aP+gCcSMb4zYTr4wpXRnDvGFFgICc0NZup8tHQ6dHHf12QD6y/teH00Ympd5Hpur15eBxarD+rmggvF9pG4mLBNeKwHeGivmlbFEuvofBmiZLSKyhrWviQUJ76gxGt2UhcJBqtsl8DBpC5ybJ0I6CBA0CIu1BUwBYjVbTGfECjkMiC60bbv55kgH4fQNGsVu2RsYtuH/c5dpVymyeQA== Received: from SN6PR06MB5342.namprd06.prod.outlook.com (2603:10b6:805:f9::31) by SJ2PR06MB9353.namprd06.prod.outlook.com (2603:10b6:a03:562::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.27; Fri, 8 Dec 2023 20:34:04 +0000 Received: from SN6PR06MB5342.namprd06.prod.outlook.com ([fe80::3fca:a39b:c9d2:c834]) by SN6PR06MB5342.namprd06.prod.outlook.com ([fe80::3fca:a39b:c9d2:c834%2]) with mapi id 15.20.7068.028; Fri, 8 Dec 2023 20:34:04 +0000 Date: Fri, 8 Dec 2023 14:34:00 -0600 From: Chris Morgan To: Larry Finger Cc: Chris Morgan , linux-wireless@vger.kernel.org, kvalo@kernel.org, pkshih@realtek.com Subject: Re: [PATCH] wifi: rtw88: Use random MAC when efuse MAC invalid Message-ID: References: <20231208150739.129753-1-macroalpha82@gmail.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TMN: [A/S0zPVYzU6wmrxXGFXy6iJlpfiYj7Y/] X-ClientProxiedBy: SA0PR12CA0027.namprd12.prod.outlook.com (2603:10b6:806:6f::32) To SN6PR06MB5342.namprd06.prod.outlook.com (2603:10b6:805:f9::31) X-Microsoft-Original-Message-ID: Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR06MB5342:EE_|SJ2PR06MB9353:EE_ X-MS-Office365-Filtering-Correlation-Id: 40273901-5985-4739-3f71-08dbf82d0433 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4npbQQTmuaaNcatUDnXtiq4UPs4p8zBX4gnjb/pP0t//vlfuvTkl9/zLDMTfcxVate5HFFNUX8q7AQoHloPs8Qse2afx2XAYz1J1bZDjKPnqn3M9ca6Krw7qtd6dSUU9+Z2YlmtowU0W3QQFzE9De69OCFj0CDoCtNE1PA4fDEpDTDhwcPoPoB/Jy6m+N5qx5r2eoYGScMR1/hwhlaX4Hd5JdbEUdBzQIHMqotcHkBt5BY69cgGFFmM481RSntGq6x9pX1pbsFVaHwsAEIOVv03fifmPt0vxQ8x/AU4X8Kn+ocS7Y1As8U+os/a2EY6CEaJ7hFY1FE0zzBluUmURJqM0uFfh+oNcYdCSwabxi8dajY182get+VpmYPmJNRutmnM98vEB9z869vX1/BsbnMPSaR5+xLvCVWMkuMqm91Tqtzm9JB1adnCd7qUzKhEEdTlMnb58Ti4L3TwYKLOJekxp25b3TlZLDs3iBjFuXpUaLWNVLDP5JD/tIOOJN725NI/kax9OwaNXPFPlq1Lwbn4tw9eJNUFeDDXa4cs+nVrS4wX7HCAI0tMUnKbwgfG8 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qzvjLo1LuEL5MN8gyXDpxaHXkxTglDWdkvxpb7JYwIF/jM6bMNipNzUE9jKa?= =?us-ascii?Q?5WelIIEbCa74gyrUo+EBcLlAjkG/+jNW5kZZvgC70kgO8iNAKQjgHOeE2tZm?= =?us-ascii?Q?TPzSP5PI2aa1scVpK+hf6CPEeszfoIGNE0tArUFrOLIsGACnlu4iA9/0o98e?= =?us-ascii?Q?jXs3NK9oOWLEdJlhTqXgoRMiHnknpvBZGUCBQo9Lkb/NQgre1K4KOeRNesaU?= =?us-ascii?Q?MIO+oQuldvDORij41KRrBIn+r3ghqvst3eails7dtdn5TV4P8twz6EyIJJuc?= =?us-ascii?Q?0MnXqJSAAc5phVTgMK10rgi/VehRA5LL+h5J44gbRsJoyc8WN+SxEjGmqnmT?= =?us-ascii?Q?7PXRLGWjbHQur7FEt447mrQgEdtx8w8Qncyy/CX9CIPvHpuG2/PCy+nXXvrG?= =?us-ascii?Q?jfDRiFk89E4p9x8pr0uZTfjbQRlEZxTFC0w7eMZrtQJeySI7Lfx6lUqz6y3n?= =?us-ascii?Q?lsawTvIdYRUwfj3hTKFIY8MlqwifJKGHRTIBDgSqLH45JNZrg/Mn3C/hUQBn?= =?us-ascii?Q?76ftyZtlkEDgzMOUMb8mA/RBN23h3mO5v+xllbZ+Kj801GmOivBd6/LXaAKH?= =?us-ascii?Q?G5Q3PIcnC9ObzTZNv/4NeIQJJbMGYu0AhipNxtTUkaTxfmCQkNi96deWjXQk?= =?us-ascii?Q?he4gZqbf+A9+2RLe1XRnwwlLsDycp2jSgzXRdiKpGWFK581+34d0EKYCj7ib?= =?us-ascii?Q?Go2LEmagVu0Xt+s801jEIpgBlFQLvOfXTxgbimG4cM54AX0uTC367D7hpQIX?= =?us-ascii?Q?z5Z/HckJ3A5RP0XmEP0RbFxU4cP9nVzkBAuUuEitYyFLT5WtmuoADy4kLlJ9?= =?us-ascii?Q?TL803mT+A08mXoLNni/T3XwXW/N0XC/wH5Ggrl3+0iSZfeTi4cF47TsPWUFx?= =?us-ascii?Q?/apzxv+Oxx9//uqbnMXDdIc4PpR6/8Sf21M653WHsI+XYERnJvXmmYZ7ouRR?= =?us-ascii?Q?tCsBPits/cMyT0HAYQdoO+jtwXQwYwRqq5yINt16OVc4so+FNBu5rOfPnd8K?= =?us-ascii?Q?b3qObM6l9/7B2vjjNxF3H4GnWAPVsk/3jQCPfS+bKgGFJXicPj9cSssvcAw0?= =?us-ascii?Q?vmcghqB5v9cTj9F83V1LEJi0gzcgflktSyMSLnWG5CUdv6LgiioDVupIyvJ8?= =?us-ascii?Q?8KLAwBQ72264RP0sl11titACoYkA4PqcrbSllNejatdaOCSM2UdG9Z4/xxb2?= =?us-ascii?Q?3k9H6Iis2Jm7u1LVwe29wAYTT6vGHaeteLAR5oQC6gN2u4bWx9/xJ/rPTYQ?= =?us-ascii?Q?=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-89723.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 40273901-5985-4739-3f71-08dbf82d0433 X-MS-Exchange-CrossTenant-AuthSource: SN6PR06MB5342.namprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2023 20:34:04.5245 (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: SJ2PR06MB9353 On Fri, Dec 08, 2023 at 10:17:00AM -0600, Larry Finger wrote: > On 12/8/23 09:07, Chris Morgan wrote: > > From: Chris Morgan > > > > When the MAC address read from the efuse data is invalid, warn the > > user and use a random MAC address instead. > > > > On a device I am currently using (Anbernic RG-ARC) with a rtw8821cs > > the efuse appears to be incompletely/improperly programmed. The MAC > > address reads as ff:ff:ff:ff:ff:ff. When networkmanager attempts to > > initiate a connection (and I haven't hard-coded a MAC address or > > set it to random) it fails to establish a connection. > > > > Signed-off-by: Chris Morgan > > --- > > drivers/net/wireless/realtek/rtw88/main.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c > > index 4a33d2e47f33..6d22628129d0 100644 > > --- a/drivers/net/wireless/realtek/rtw88/main.c > > +++ b/drivers/net/wireless/realtek/rtw88/main.c > > @@ -2008,6 +2008,11 @@ static int rtw_chip_efuse_info_setup(struct rtw_dev *rtwdev) > > efuse->ext_pa_5g = efuse->pa_type_5g & BIT(0) ? 1 : 0; > > efuse->ext_lna_2g = efuse->lna_type_5g & BIT(3) ? 1 : 0; > > + if (!is_valid_ether_addr(efuse->addr)) { > > + eth_random_addr(efuse->addr); > > + dev_warn(rtwdev->dev, "efuse MAC invalid, using random\n"); > > + } > > + > > out_disable: > > rtw_chip_efuse_disable(rtwdev); > > Reviewed by Larry Finger > > Thanks for this patch. > > There are a number of SDIO devices known to me with improperly coded EFUSE > values. It seems that RTW8723DS chips perform poorly even when given a valid > MAC address. Is this also true for RTW8821CS chips? The RTW8821CS I have in this specific case doesn't perform all that well, but it also has sub-optimal antennas. I'm not noticing any major performance difference between the devices with a valid MAC address and the device I have without one. They're both pulling about 8MB/s over scp on a 5GHz 802.11ac(ax wifi gateway) network. Thank you, Chris > > Larry >