Commit 4f5dadce authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

cfg80211: fix MFP bug, sparse warnings

sparse warns about a number of things, and one of them
(use_mfp shadowed variable) actually is a bug, fix all
of them.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4d0c8aea
...@@ -3239,11 +3239,11 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) ...@@ -3239,11 +3239,11 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
} }
if (info->attrs[NL80211_ATTR_USE_MFP]) { if (info->attrs[NL80211_ATTR_USE_MFP]) {
enum nl80211_mfp use_mfp = enum nl80211_mfp mfp =
nla_get_u32(info->attrs[NL80211_ATTR_USE_MFP]); nla_get_u32(info->attrs[NL80211_ATTR_USE_MFP]);
if (use_mfp == NL80211_MFP_REQUIRED) if (mfp == NL80211_MFP_REQUIRED)
use_mfp = true; use_mfp = true;
else if (use_mfp != NL80211_MFP_NO) { else if (mfp != NL80211_MFP_NO) {
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
......
...@@ -855,7 +855,7 @@ static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions) ...@@ -855,7 +855,7 @@ static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions)
return 0; return 0;
} }
int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher) static int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher)
{ {
wdev->wext.connect.crypto.cipher_group = 0; wdev->wext.connect.crypto.cipher_group = 0;
...@@ -880,7 +880,7 @@ int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher) ...@@ -880,7 +880,7 @@ int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher)
return 0; return 0;
} }
int cfg80211_set_cipher_pairwise(struct wireless_dev *wdev, u32 cipher) static int cfg80211_set_cipher_pairwise(struct wireless_dev *wdev, u32 cipher)
{ {
int nr_ciphers = 0; int nr_ciphers = 0;
u32 *ciphers_pairwise = wdev->wext.connect.crypto.ciphers_pairwise; u32 *ciphers_pairwise = wdev->wext.connect.crypto.ciphers_pairwise;
...@@ -918,7 +918,7 @@ int cfg80211_set_cipher_pairwise(struct wireless_dev *wdev, u32 cipher) ...@@ -918,7 +918,7 @@ int cfg80211_set_cipher_pairwise(struct wireless_dev *wdev, u32 cipher)
} }
int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt) static int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt)
{ {
int nr_akm_suites = 0; int nr_akm_suites = 0;
......
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