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)
committerHector Martin <marcan@marcan.st>
Sat, 19 Feb 2022 08:17:03 +0000 (17:17 +0900)
commit15cd5dd687d0b667298cd2a7d9e5966f58e2cc87
treef1365c7a260b581facc616d1e26a3b90f5ae35b6
parent8ad0f256eccca6e552589c0814abe4bcff183a41
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