brcmfmac: cfg80211: Pass the PMK in binary instead of hex
authorHector Martin <marcan@marcan.st>
Mon, 20 Dec 2021 10:15:58 +0000 (19:15 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Mar 2022 17:44:58 +0000 (10:44 -0700)
commitb183f4b646bd6cafcd32816a02e2c2b90671e791
tree4edc75e9397a3c7b0cdf5773e7a3c267893827f1
parent9ed7c2007dc18ec4736d04fa2000f0a284cd38e7
brcmfmac: cfg80211: Pass the PMK in binary instead of hex

Apparently the hex passphrase mechanism does not work on newer
chips/firmware (e.g. BCM4387). It seems there was a simple way of
passing it in binary all along, so use that and avoid the hexification.

OpenBSD has been doing it like this from the beginning, so this should
work on all chips.

Also clear the structure before setting the PMK. This was leaking
uninitialized stack contents to the device.

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