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>
Tue, 18 Jan 2022 11:22:11 +0000 (20:22 +0900)
commit1c25de975a9bfa3a3761c4e069549fe1e049e588
tree76aec0587e64d123b6ebf008516921e24cb73928
parent68127d75d3daa0376d14a8094ab6b75e5a37a6fd
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