On 06/17/2019 10:33, Marcel Holtmann wrote: > Hi Chi-hsien, > >>>> i was able to reproduce an (maybe older issue) with 4-way handshake >>>> offloading for 802.1X in the brcmfmac driver. My setup consists of >>>> Raspberry Pi 3 B (current linux-next, arm64/defconfig) on STA side and a >>>> Raspberry Pi 3 A+ (Linux 4.19) on AP side. >>> >>> Looks like Raspberry Pi isn't the only affected platform [3], [4]. >>> >>> [3] - https://bugzilla.redhat.com/show_bug.cgi?id=1665608 >>> [4] - https://bugzilla.kernel.org/show_bug.cgi?id=202521 >> >> Stefan, >> >> Could you please try the attached patch for your wpa_supplicant? We'll >> upstream if it works for you. > > I hope that someone is also providing a kernel patch to fix the issue. Hacking around a kernel issue in userspace is not enough. Fix the root cause in the kernel. Marcel, This is a kernel warning for invalid application PMK set actions, so the fix is to only set PMK to wifi driver when 4-way is offloaded. I think Arend added the WARN_ON() intentionally to catch application misuse of PMK setting. You may also remove the warnings with the attached patch, but let's see what Arend says first. Arend, Any comment? Regards, Chi-hsien Lin > > Regards > > Marcel > > . >
From a54c0e7dcd815a5ef31bdbabe44792f2cedce0e3 Mon Sep 17 00:00:00 2001 From: Chi-Hsien Lin <chi-hsien.lin@xxxxxxxxxxx> Date: Mon, 17 Jun 2019 23:42:23 -0500 Subject: [PATCH] brcmfmac: remove WARN_ON() for invalid pmk set 2526ff21aa77c("brcmfmac: support 4-way handshake offloading for 802.1X") added WARN_ON() to catch invalid PMK usage. Remove them and keep the error return EINVAL. Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@xxxxxxxxxxx> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index e9c8b21091a1..08b5fad38307 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -1938,7 +1938,7 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, } if (sme->crypto.psk) { - if (WARN_ON(profile->use_fwsup != BRCMF_PROFILE_FWSUP_NONE)) { + if (profile->use_fwsup != BRCMF_PROFILE_FWSUP_NONE) { err = -EINVAL; goto done; } @@ -5173,7 +5173,7 @@ static int brcmf_cfg80211_set_pmk(struct wiphy *wiphy, struct net_device *dev, /* expect using firmware supplicant for 1X */ ifp = netdev_priv(dev); - if (WARN_ON(ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X)) + if (ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X) return -EINVAL; if (conf->pmk_len > BRCMF_WSEC_MAX_PSK_LEN) @@ -5189,7 +5189,7 @@ static int brcmf_cfg80211_del_pmk(struct wiphy *wiphy, struct net_device *dev, brcmf_dbg(TRACE, "enter\n"); ifp = netdev_priv(dev); - if (WARN_ON(ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X)) + if (ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X) return -EINVAL; return brcmf_set_pmk(ifp, NULL, 0); -- 2.1.0