brcmfmac: correct setting of WEP broadcast/unicast keys
authorDaniel Kim <dekim@broadcom.com>
Wed, 29 Jan 2014 14:32:23 +0000 (15:32 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 Feb 2014 20:35:54 +0000 (15:35 -0500)
The brcmf_add_keyext() is for setting per-station key for cipher
algorithms such as WPA1/WPA2 and should not be used to set
WEP broadcast/unicast keys. This patch fixes connect failure
problem with AP using 802.1x-WEP.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Daniel Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

index 6dc718b..a54db91 100644 (file)
@@ -1980,7 +1980,9 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
        if (!check_vif_up(ifp->vif))
                return -EIO;
 
-       if (mac_addr) {
+       if (mac_addr &&
+               (params->cipher != WLAN_CIPHER_SUITE_WEP40) &&
+               (params->cipher != WLAN_CIPHER_SUITE_WEP104)) {
                brcmf_dbg(TRACE, "Exit");
                return brcmf_add_keyext(wiphy, ndev, key_idx, mac_addr, params);
        }