diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-06 21:56:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:02:32 -0400 |
commit | 4f5dadcebb55fccef34722bbbf6401d39124c8a4 (patch) | |
tree | c29d44d5e5605db36c28cb3052a238bbe45bf77e | |
parent | 4d0c8aead32ecdbe1310ad473b3637991f560865 (diff) |
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: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/wireless/nl80211.c | 6 | ||||
-rw-r--r-- | net/wireless/wext-compat.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index df22048419e3..4976eac888a3 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3239,11 +3239,11 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info) | |||
3239 | } | 3239 | } |
3240 | 3240 | ||
3241 | if (info->attrs[NL80211_ATTR_USE_MFP]) { | 3241 | if (info->attrs[NL80211_ATTR_USE_MFP]) { |
3242 | enum nl80211_mfp use_mfp = | 3242 | enum nl80211_mfp mfp = |
3243 | nla_get_u32(info->attrs[NL80211_ATTR_USE_MFP]); | 3243 | nla_get_u32(info->attrs[NL80211_ATTR_USE_MFP]); |
3244 | if (use_mfp == NL80211_MFP_REQUIRED) | 3244 | if (mfp == NL80211_MFP_REQUIRED) |
3245 | use_mfp = true; | 3245 | use_mfp = true; |
3246 | else if (use_mfp != NL80211_MFP_NO) { | 3246 | else if (mfp != NL80211_MFP_NO) { |
3247 | err = -EINVAL; | 3247 | err = -EINVAL; |
3248 | goto out; | 3248 | goto out; |
3249 | } | 3249 | } |
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 2c33cd83cfe9..9d101d566bb1 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c | |||
@@ -855,7 +855,7 @@ static int cfg80211_set_wpa_version(struct wireless_dev *wdev, u32 wpa_versions) | |||
855 | return 0; | 855 | return 0; |
856 | } | 856 | } |
857 | 857 | ||
858 | int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher) | 858 | static int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher) |
859 | { | 859 | { |
860 | wdev->wext.connect.crypto.cipher_group = 0; | 860 | wdev->wext.connect.crypto.cipher_group = 0; |
861 | 861 | ||
@@ -880,7 +880,7 @@ int cfg80211_set_cipher_group(struct wireless_dev *wdev, u32 cipher) | |||
880 | return 0; | 880 | return 0; |
881 | } | 881 | } |
882 | 882 | ||
883 | int cfg80211_set_cipher_pairwise(struct wireless_dev *wdev, u32 cipher) | 883 | static int cfg80211_set_cipher_pairwise(struct wireless_dev *wdev, u32 cipher) |
884 | { | 884 | { |
885 | int nr_ciphers = 0; | 885 | int nr_ciphers = 0; |
886 | u32 *ciphers_pairwise = wdev->wext.connect.crypto.ciphers_pairwise; | 886 | 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 | } | 918 | } |
919 | 919 | ||
920 | 920 | ||
921 | int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt) | 921 | static int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt) |
922 | { | 922 | { |
923 | int nr_akm_suites = 0; | 923 | int nr_akm_suites = 0; |
924 | 924 | ||