]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: ath9k: return by of_get_mac_address
authorRosen Penev <rosenp@gmail.com>
Tue, 5 Nov 2024 22:23:26 +0000 (14:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:17 +0000 (14:40 +0200)
[ Upstream commit dfffb317519f88534bb82797f055f0a2fd867e7b ]

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>
Link: https://patch.msgid.link/20241105222326.194417-1-rosenp@gmail.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath9k/init.c

index 4f00400c7ffb83545d461c623f055b73481efb02..58386906598a7357557cda6cb4ec6bf2ec93a965 100644 (file)
@@ -691,7 +691,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;
 }