]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:32:36 +0000 (17:32 +0100)
commit6d9f78cc494c0ce25d9bd1a7e40a95828c8cb1c6
treee0066f7239fb0abc0e30565b33069601654d28ef
parent99a09075e62a01b1d659fc7970011d3bf963bf02
wifi: brcmfmac: pcie: Provide a buffer of random bytes to the device

[ Upstream commit 91918ce88d9fef408bb12c46a27c73d79b604c20 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c