From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 6/9] cfg80211: fix MFP bug, sparse warnings
Date: Tue, 07 Jul 2009 03:56:10 +0200 [thread overview]
Message-ID: <20090707015709.031033179@sipsolutions.net> (raw)
In-Reply-To: 20090707015604.369008211@sipsolutions.net
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>
---
net/wireless/nl80211.c | 6 +++---
net/wireless/wext-compat.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
--- wireless-testing.orig/net/wireless/nl80211.c 2009-07-07 03:37:05.000000000 +0200
+++ wireless-testing/net/wireless/nl80211.c 2009-07-07 03:37:05.000000000 +0200
@@ -3239,11 +3239,11 @@ static int nl80211_associate(struct sk_b
}
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]);
- if (use_mfp == NL80211_MFP_REQUIRED)
+ if (mfp == NL80211_MFP_REQUIRED)
use_mfp = true;
- else if (use_mfp != NL80211_MFP_NO) {
+ else if (mfp != NL80211_MFP_NO) {
err = -EINVAL;
goto out;
}
--- wireless-testing.orig/net/wireless/wext-compat.c 2009-07-07 03:29:39.000000000 +0200
+++ wireless-testing/net/wireless/wext-compat.c 2009-07-07 03:37:05.000000000 +0200
@@ -855,7 +855,7 @@ static int cfg80211_set_wpa_version(stru
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;
@@ -880,7 +880,7 @@ int cfg80211_set_cipher_group(struct wir
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;
u32 *ciphers_pairwise = wdev->wext.connect.crypto.ciphers_pairwise;
@@ -918,7 +918,7 @@ int cfg80211_set_cipher_pairwise(struct
}
-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;
--
next prev parent reply other threads:[~2009-07-07 2:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-07 1:56 [PATCH 0/9] cfg80211 fixes, cleanups, improvements Johannes Berg
2009-07-07 1:56 ` [PATCH 1/9] cfg80211: fix netdev down problem Johannes Berg
2009-07-07 1:56 ` [PATCH 2/9] cfg80211: dont use union for wext Johannes Berg
2009-07-07 1:56 ` [PATCH 3/9] cfg80211: mlme API must be able to sleep Johannes Berg
2009-07-07 1:56 ` [PATCH 4/9] cfg80211: warn again on spurious deauth Johannes Berg
2009-07-07 1:56 ` [PATCH 5/9] cfg80211: properly name driver locking Johannes Berg
2009-07-07 1:56 ` Johannes Berg [this message]
2009-07-07 1:56 ` [PATCH 7/9] cfg80211: fix locking Johannes Berg
2009-07-07 1:56 ` [PATCH 8/9] cfg80211: clean up naming once and for all Johannes Berg
2009-07-07 1:56 ` [PATCH 9/9] cfg80211: disallow configuring unsupported interfaces Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090707015709.031033179@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).