wifi: brcmfmac: pcie: Provide a buffer of random bytes to the device
authorHector Martin <marcan@marcan.st>
Tue, 14 Feb 2023 08:00:34 +0000 (17:00 +0900)
committerKalle Valo <kvalo@kernel.org>
Mon, 27 Feb 2023 10:41:05 +0000 (12:41 +0200)
commit91918ce88d9fef408bb12c46a27c73d79b604c20
treea54bfcfff1cdda182c8467958866a4e3845cfd84
parent0f485805d008aa56644f68179a7e6579fc1515e7
wifi: brcmfmac: pcie: Provide a buffer of random bytes to the device

Newer Apple firmwares on chipsets without a hardware RNG require the
host to provide a buffer of 256 random bytes to the device on
initialization. This buffer is present immediately before NVRAM,
suffixed by a footer containing a magic number and the buffer length.

This won't affect chips/firmwares that do not use this feature, so do it
unconditionally for all Apple platforms (those with an Apple OTP).

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230214080034.3828-3-marcan@marcan.st
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c