linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3] wifi: ath9k: return by of_get_mac_address
@ 2024-11-05 22:23 Rosen Penev
  2024-11-06  9:09 ` Toke Høiland-Jørgensen
  2025-01-29 17:03 ` Jeff Johnson
  0 siblings, 2 replies; 3+ messages in thread
From: Rosen Penev @ 2024-11-05 22:23 UTC (permalink / raw)
  To: linux-wireless; +Cc: Toke Høiland-Jørgensen, Kalle Valo, open list

When using nvmem, ath9k could potentially be loaded before nvmem, which
loads after mtd. This is an issue if DT contains an nvmem mac address.

If nvmem is not ready in time for ath9k, -EPROBE_DEFER is returned. Pass
it to _probe so that ath9k can properly grab a potentially present MAC
address.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 v3: only return EPROBE_DEFER to avoid terminating probe.
 v2: modified commit message
 drivers/net/wireless/ath/ath9k/init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index f9e77c4624d9..01e0dffbf57e 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -647,7 +647,9 @@ static int ath9k_of_init(struct ath_softc *sc)
 		ah->ah_flags |= AH_NO_EEP_SWAP;
 	}
 
-	of_get_mac_address(np, common->macaddr);
+	ret = of_get_mac_address(np, common->macaddr);
+	if (ret == -EPROBE_DEFER)
+		return ret;
 
 	return 0;
 }
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCHv3] wifi: ath9k: return by of_get_mac_address
  2024-11-05 22:23 [PATCHv3] wifi: ath9k: return by of_get_mac_address Rosen Penev
@ 2024-11-06  9:09 ` Toke Høiland-Jørgensen
  2025-01-29 17:03 ` Jeff Johnson
  1 sibling, 0 replies; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2024-11-06  9:09 UTC (permalink / raw)
  To: Rosen Penev, linux-wireless; +Cc: Kalle Valo, open list

Rosen Penev <rosenp@gmail.com> writes:

> When using nvmem, ath9k could potentially be loaded before nvmem, which
> loads after mtd. This is an issue if DT contains an nvmem mac address.
>
> If nvmem is not ready in time for ath9k, -EPROBE_DEFER is returned. Pass
> it to _probe so that ath9k can properly grab a potentially present MAC
> address.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCHv3] wifi: ath9k: return by of_get_mac_address
  2024-11-05 22:23 [PATCHv3] wifi: ath9k: return by of_get_mac_address Rosen Penev
  2024-11-06  9:09 ` Toke Høiland-Jørgensen
@ 2025-01-29 17:03 ` Jeff Johnson
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2025-01-29 17:03 UTC (permalink / raw)
  To: linux-wireless, Rosen Penev
  Cc: Toke Høiland-Jørgensen, Kalle Valo, linux-kernel


On Tue, 05 Nov 2024 14:23:26 -0800, Rosen Penev wrote:
> When using nvmem, ath9k could potentially be loaded before nvmem, which
> loads after mtd. This is an issue if DT contains an nvmem mac address.
> 
> If nvmem is not ready in time for ath9k, -EPROBE_DEFER is returned. Pass
> it to _probe so that ath9k can properly grab a potentially present MAC
> address.
> 
> [...]

Applied, thanks!

[1/1] wifi: ath9k: return by of_get_mac_address
      commit: dfffb317519f88534bb82797f055f0a2fd867e7b

Best regards,
-- 
Jeff Johnson <jeff.johnson@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-29 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05 22:23 [PATCHv3] wifi: ath9k: return by of_get_mac_address Rosen Penev
2024-11-06  9:09 ` Toke Høiland-Jørgensen
2025-01-29 17:03 ` Jeff Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).