Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1964797pxb; Thu, 28 Oct 2021 13:30:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCc/SIrGvBuCvS0eK9X7tg73iIZMDh0LfNsnkQbGwXZ/nufgvPG0VS+4LZlVQ9tefXGO9e X-Received: by 2002:a05:6402:cb8:: with SMTP id cn24mr9028649edb.190.1635453007394; Thu, 28 Oct 2021 13:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635453007; cv=none; d=google.com; s=arc-20160816; b=t5BVUSPu5gzehrw8tdIytXj5/siUo2dbERH86wVahB7JBbTIRQoycPONyg3+yBGLDG 90EAmKbjFY10ggY61CixVBAMs9Pg1xVKjKpJSBWIExlvVKTH4i7KfD90+9pMeu+WPbiI 0axLoakePAHtACTwnp0VOtvS5P8wbOCFpqiGTALHVvCPRZVmMt7LhQVWj2v7Wp+KA1cL gUzVb1dCsOc12I6fRofHySJFAXfeLB553OWrNqePCe+DvFdIVwCMRXh5l+YN8ixMuy2G FA/d0MKJc8rrBA0psGE64ApK+wU1N0d0dDA1PQu1tBTFUQdVIGdJ8A5cGSujOdz9dXJ4 PWLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=UNdKYXhS7qV0l6wjFDAccaOC7L4yMliNcw90vERiz8Q=; b=WXXb291mrCRImCgvZPKlCUm9rOKizU2t/buNlHBCH1iAbQQpAozxS/qvz/ULIR1qRi TGs7Uih9lpXUdKdNqPF4ygxqwB7xN0zlCO3SLmxL1WIH7ifVC9mbpZIy/PfM1WHF10FV ABa/8Q96KIeGo6oTnqtUpCKWYBqk7Jc3ZiQoSkiwAakaUVRxsYmJIANdHoBixiqqO7ag 2FveWTPZlPgq9diKc9ElNH+CcQu7O09UmOBgNaOo0yIqyZ/jTXJPwaOgM0YDAogH4m0q od1TULQOw1MMfkUdMxU4hGoRdBNheksNhVVpyqEDYo5aVU86IpMMLBR/KyidhV8fxkre Jf3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=maxwUy6i; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v20si5066226eds.301.2021.10.28.13.29.44; Thu, 28 Oct 2021 13:30:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=maxwUy6i; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231215AbhJ1UcC (ORCPT + 67 others); Thu, 28 Oct 2021 16:32:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231206AbhJ1UcB (ORCPT ); Thu, 28 Oct 2021 16:32:01 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60CCAC061745 for ; Thu, 28 Oct 2021 13:29:34 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id z11-20020a1c7e0b000000b0030db7b70b6bso10554968wmc.1 for ; Thu, 28 Oct 2021 13:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=UNdKYXhS7qV0l6wjFDAccaOC7L4yMliNcw90vERiz8Q=; b=maxwUy6iRwTx4f2NDKdA3IJIrec8wTUIllsMDdNTPs6/SA8sJ+Fdoo5Y363JbyUzoH RYHbMOaxAWzycLypTYL9pNdNo9G7qY3EzILR8mb+67aHcu9qFbldb7LEZsFyxrDUHFO9 D9I+0WUG194gfIPhyjmfRgoXEvU3bdbxEH7x5elx99La2MCPTVwPpmHzL0NCzxW0Gef1 DzwSf+d+ejquOursnI06rCrFG889ghsqK3ywx9BR3/VMXHH2yqwpvAkp/4G4+sNppu/1 uMJXUN/5HfJMnbzvjm7P812Z5q6Q0dzZ5yCwjr/Mfv1BMuyj9R564Z8l1kLIq0rOcvmS aBoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=UNdKYXhS7qV0l6wjFDAccaOC7L4yMliNcw90vERiz8Q=; b=axaUJgFCHfk0shj/GzbsKWqkzC4oMg8qVNr5QEOOLeNeffqdX52/DgZ/1b3N24II2T WE8aNqVHJELPtD2GXykIIFY7EeyfFE7mdZFRr0mK9/+zXsc9rvsXnIt4ndUoF8rQcBsi +M6oAECC4Qg3nFyShUY4HZGeT1LSRBabT7J2j6mWQvlYKypuZZIaxsb2qtdjSNrGRJQz 0UWRSO9YP8pnJ2jKLD4eQrBXPrpxeWm/P323Mz9kwKe0bAnHoePcwMghE+sdD8WuMy3+ OWqK+3K9BSnTs7NtPhgr1Bq3T+JPpAwy2+rClI4MoULv7WlIYFUYWNcyRHYj3xWINykr EcBw== X-Gm-Message-State: AOAM530CBdcZpK9YweJEBOF98GM4nVNM8WhOGxl9X93PFGqZGjIZEVF2 d9x00rHTgSLfdwldYG8mfUoKeXxwchU= X-Received: by 2002:a1c:a405:: with SMTP id n5mr6636097wme.49.1635452972946; Thu, 28 Oct 2021 13:29:32 -0700 (PDT) Received: from debian64.daheim (p5b0d7857.dip0.t-ipconnect.de. [91.13.120.87]) by smtp.gmail.com with ESMTPSA id l20sm8476656wmq.42.2021.10.28.13.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 13:29:32 -0700 (PDT) Received: from localhost.daheim ([127.0.0.1]) by debian64.daheim with esmtp (Exim 4.95) (envelope-from ) id 1mgA8q-000CCq-U7; Thu, 28 Oct 2021 22:29:31 +0200 Message-ID: Date: Thu, 28 Oct 2021 22:29:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: new "[1/2] ath10k: Try to get mac-address from dts" Content-Language: en-US To: Ansuel Smith Cc: Kalle Valo , linux-wireless@vger.kernel.org, ath10k@lists.infradead.org References: <20211016234609.1568317-1-chunkeey@gmail.com> <87ee855xwa.fsf@codeaurora.org> <3a8840ea-1499-950b-fb44-7546a32c586f@gmail.com> <875yth5pt3.fsf@codeaurora.org> <3aebb711-dc45-3cbf-43cb-12f59909baf0@gmail.com> From: Christian Lamparter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 28/10/2021 20:57, Ansuel Smith wrote: >> >> The "[1/2] ath10k: Try to get mac-address from dts" patch >> will need a respin, so it can apply cleanly. >> >> Is Anyone interested? If not, I can take a shot at it on Saturday. >> > > A refreshed patch is applied to atk10k-ct repo so it would be good to > have the same patch on normal ath10k. Many router would benefit > from that. Found it! https://github.com/greearb/ath10k-ct/commit/e6a7d5b5b834737cd12e357b5efdc2e42d923bf6.patch Hmm, Author is now "Ben" and the whole commit message is gone. Now, adding the commit message back from your original patch is not a problem, but the missing "Signed-off-by" from him and you might be. ... But then, do we need it? Because there might be the option to extend device_get_mac_address() instead?! ... >> (There's the tiny question of that device_get_mac_address() which >> ath10k currently uses. It looks a lot like of_get_mac_address() too! >> but with extra ACPI (through FWNODE-which also includes OF), but >> without NVMEM.) >> >> Cheers, >> Christian > > About this I never manage to understand the priority... Should ACPI > variant have priority and fallback to the OF api or the OF api should > overwrite any mac if a nvmem cell is found? Hmm, from what I know the device_/fwnode_*() functions are just wrappers for either ACPI (on systems with ACPI - x86 and ARM) or OF (on systems with Device-tree) functions... (There is also "software nodes", I think these are the lookupd stuff that came up recently with APU2 + MX100) This confused me too. But I might be able to show this in the context of ath10k-ct's current ath10k_core_probe_fw() and this threads new subject: copied in here for a better reading experience: | |device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr)); | |/* Try to get mac address from device node (from nvmem cell) */ |of_get_mac_address(ar->dev->of_node, ar->mac_addr); | The device_get_mac_address() will on OF platforms essentially check and process the same "mac-address", "local-mac-address" and "address" OF properties of the same device-tree node as the following of_get_mac_address() will do. There's no priority. I think now, that instead of adding of_get_mac_address() into ath10k, the time might be better spent asking what's the goal for device_get_mac_address() is. Is device_get_mac_address() poised to usurp of_get_mac_address()? And if it is: Should it be extended to get that "mac-address in nvmem-cell" as well? Because then we don't really need to touch ath10k at all (well, maybe except for -EPROBE_DEFER handling). Cheers, Christian