ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@gmail.com>
To: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: new "[1/2] ath10k: Try to get mac-address from dts"
Date: Thu, 28 Oct 2021 22:29:31 +0200	[thread overview]
Message-ID: <e6936f55-6ca7-209c-8c3f-5eeae879c9dc@gmail.com> (raw)
In-Reply-To: <CA+_ehUxFDUE6BU3TbngKOA-VKCBkTnpOv7ibTjtpur37KrQ4Jw@mail.gmail.com>

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:

<https://github.com/greearb/ath10k-ct/blob/e6a7d5b5b834737cd12e357b5efdc2e42d923bf6/ath10k-5.15/core.c#L4044>
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

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2021-10-28 20:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-16 23:46 [PATCH v2] ath10k: fetch (pre-)calibration data via nvmem subsystem Christian Lamparter
2021-10-28  8:58 ` Kalle Valo
2021-10-28 11:31   ` Christian Lamparter
2021-10-28 11:39     ` Ansuel Smith
2021-10-28 11:52     ` Kalle Valo
2021-10-28 18:50       ` Christian Lamparter
2021-10-28 18:57         ` Ansuel Smith
2021-10-28 20:29           ` Christian Lamparter [this message]
2021-10-28 20:35             ` new "[1/2] ath10k: Try to get mac-address from dts" Ben Greear
2021-10-28 20:38             ` Ansuel Smith
2021-11-01 14:25         ` [PATCH v2] ath10k: fetch (pre-)calibration data via nvmem subsystem Kalle Valo
2021-11-01 14:17 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e6936f55-6ca7-209c-8c3f-5eeae879c9dc@gmail.com \
    --to=chunkeey@gmail.com \
    --cc=ansuelsmth@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox