]> git.itanic.dy.fi Git - linux-stable/commit
wifi: brcmfmac: cfg80211: Pass the PMK in binary instead of hex
authorHector Martin <marcan@marcan.st>
Tue, 14 Feb 2023 09:24:19 +0000 (18:24 +0900)
committerKalle Valo <kvalo@kernel.org>
Mon, 27 Feb 2023 14:59:35 +0000 (16:59 +0200)
commit89b89e52153fda2733562776c7c9d9d3ebf8dd6d
tree8d635b200e17538338cc9e3a2312cc7351140fd1
parenta96202acaea47fa8377088e0952bb63bd02a3bab
wifi: 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>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230214092423.15175-6-marcan@marcan.st
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c