brcmfmac: pcie: Provide a buffer of random bytes to the device
authorHector Martin <marcan@marcan.st>
Thu, 23 Dec 2021 10:30:17 +0000 (19:30 +0900)
committerHector Martin <marcan@marcan.st>
Tue, 18 Jan 2022 11:22:10 +0000 (20:22 +0900)
commit555ce12abfeb0388ac7fac2fd29c0015a320b38e
tree10305e54c7dd48b2284090777cdc60cf09bcd8de
parenteb3ec087346a24fe956ffc0c5d9446dd565435df
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.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Hector Martin <marcan@marcan.st>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c