Commit a718e2fe authored by Roland Vossen's avatar Roland Vossen Committed by John W. Linville

brcm80211: fmac: fixed weird indentation

And changed function name to something more appropriate.
Reported-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Reviewed-by: default avatarAlwin Beukers <alwin@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c68cdc0f
...@@ -1152,7 +1152,7 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme) ...@@ -1152,7 +1152,7 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
} }
static s32 static s32
brcmf_set_set_sharedkey(struct net_device *ndev, brcmf_set_wep_sharedkey(struct net_device *ndev,
struct cfg80211_connect_params *sme) struct cfg80211_connect_params *sme)
{ {
struct brcmf_cfg80211_priv *cfg_priv = ndev_to_cfg(ndev); struct brcmf_cfg80211_priv *cfg_priv = ndev_to_cfg(ndev);
...@@ -1162,15 +1162,19 @@ brcmf_set_set_sharedkey(struct net_device *ndev, ...@@ -1162,15 +1162,19 @@ brcmf_set_set_sharedkey(struct net_device *ndev,
s32 err = 0; s32 err = 0;
WL_CONN("key len (%d)\n", sme->key_len); WL_CONN("key len (%d)\n", sme->key_len);
if (sme->key_len) {
if (sme->key_len == 0)
return 0;
sec = brcmf_read_prof(cfg_priv, WL_PROF_SEC); sec = brcmf_read_prof(cfg_priv, WL_PROF_SEC);
WL_CONN("wpa_versions 0x%x cipher_pairwise 0x%x\n", WL_CONN("wpa_versions 0x%x cipher_pairwise 0x%x\n",
sec->wpa_versions, sec->cipher_pairwise); sec->wpa_versions, sec->cipher_pairwise);
if (!
(sec->wpa_versions & (NL80211_WPA_VERSION_1 | if (sec->wpa_versions & (NL80211_WPA_VERSION_1 | NL80211_WPA_VERSION_2))
NL80211_WPA_VERSION_2)) return 0;
&& (sec->cipher_pairwise & (WLAN_CIPHER_SUITE_WEP40 |
WLAN_CIPHER_SUITE_WEP104))) { if (sec->cipher_pairwise &
(WLAN_CIPHER_SUITE_WEP40 | WLAN_CIPHER_SUITE_WEP104)) {
memset(&key, 0, sizeof(key)); memset(&key, 0, sizeof(key));
key.len = (u32) sme->key_len; key.len = (u32) sme->key_len;
key.index = (u32) sme->key_idx; key.index = (u32) sme->key_idx;
...@@ -1210,7 +1214,6 @@ brcmf_set_set_sharedkey(struct net_device *ndev, ...@@ -1210,7 +1214,6 @@ brcmf_set_set_sharedkey(struct net_device *ndev,
} }
} }
} }
}
return err; return err;
} }
...@@ -1271,9 +1274,9 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, ...@@ -1271,9 +1274,9 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
goto done; goto done;
} }
err = brcmf_set_set_sharedkey(ndev, sme); err = brcmf_set_wep_sharedkey(ndev, sme);
if (err) { if (err) {
WL_ERR("wl_set_set_sharedkey failed (%d)\n", err); WL_ERR("brcmf_set_wep_sharedkey failed (%d)\n", err);
goto done; goto done;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment