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)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Mar 2022 17:44:58 +0000 (10:44 -0700)
commitee05994e56273fcc5868740af6faafc48f05f32d
treee2ea5a52621e0581b431b0e2c2a0b3520f36299f
parent887749675abe05c13c127f750824437e34c85792
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