From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, Zhu Yi <yi.zhu@intel.com>
Subject: [PATCH 1/3] iwmc3200wifi: fix set_wpa_version and set_auth_type order
Date: Mon, 3 Aug 2009 14:37:01 +0800 [thread overview]
Message-ID: <1249281423-26435-2-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <1249281423-26435-1-git-send-email-yi.zhu@intel.com>
iwm->umac_profile->sec.flags is set by iwm_set_wpa_version and
checked by iwm_set_auth_type. The patch changes the order to
make the flag used correctly.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
drivers/net/wireless/iwmc3200wifi/cfg80211.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
index 3f5a08f..a6e852f 100644
--- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c
+++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
@@ -484,6 +484,8 @@ static int iwm_set_auth_type(struct iwm_priv *iwm,
static int iwm_set_wpa_version(struct iwm_priv *iwm, u32 wpa_version)
{
+ IWM_DBG_WEXT(iwm, DBG, "wpa_version: %d\n", wpa_version);
+
if (!wpa_version) {
iwm->umac_profile->sec.flags = UMAC_SEC_FLG_LEGACY_PROFILE;
return 0;
@@ -508,6 +510,9 @@ static int iwm_set_cipher(struct iwm_priv *iwm, u32 cipher, bool ucast)
return 0;
}
+ IWM_DBG_WEXT(iwm, DBG, "%ccast cipher is 0x%x\n", ucast ? 'u' : 'm',
+ cipher);
+
switch (cipher) {
case IW_AUTH_CIPHER_NONE:
*profile_cipher = UMAC_CIPHER_TYPE_NONE;
@@ -584,11 +589,11 @@ static int iwm_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
iwm->umac_profile->bss_num = 0;
}
- ret = iwm_set_auth_type(iwm, sme->auth_type);
+ ret = iwm_set_wpa_version(iwm, sme->crypto.wpa_versions);
if (ret < 0)
return ret;
- ret = iwm_set_wpa_version(iwm, sme->crypto.wpa_versions);
+ ret = iwm_set_auth_type(iwm, sme->auth_type);
if (ret < 0)
return ret;
--
1.6.0.4
next prev parent reply other threads:[~2009-08-03 6:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 6:37 [PATCH 00/0] iwmc3200wifi 802.1X fixes Zhu Yi
2009-08-03 6:37 ` Zhu Yi [this message]
2009-08-03 6:37 ` [PATCH 2/3] iwmc3200wifi: set WEP key static flag correctly Zhu Yi
2009-08-03 6:37 ` [PATCH 3/3] iwmc3200wifi: avoid setting default key for 802.1X and RSNA Zhu Yi
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=1249281423-26435-2-git-send-email-yi.zhu@intel.com \
--to=yi.zhu@intel.com \
--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).