Skip to contentSkip to conversation

wifi: ath9k: return by of_get_mac_address

PATCH Applied Rosen Penev 3 participants 3 messages Nov 5, 2024 – Jan 29, 2025 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 wifi: ath9k: return by of_get_mac_address

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.

---
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(-)
drivers/net/wireless/ath/ath9k/init.c +3 -1
index f9e77c4624d9..01e0dffbf57e 100644
@@ -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;
 }
Signature · 1 line
2.47.0
maintainer Acked-by on v3 1/1
#1 lore raw
Quoted 8 lines · Rosen Penev

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
#2 lore raw
In reply to Rosen Penev
Quoted 8 lines · Rosen Penev

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,

Signature · 1 line
Jeff Johnson <[email protected]>