aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-03-30 05:44:16 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-04-09 14:27:53 -0400
commita90178fa1dce52816ae9fa4a3ba031886b79c5ae (patch)
treeedff458376981b310aa645b14dce3ba407bf4c8d
parent43a61261d7f571f760611711cd4e6b64ef661ad1 (diff)
iwlagn: simplify WEP key check
Simplify the WEP group key check by checking the sta pointer instead of the sta_id we calculate with it; also clean up the comment formatting. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 8a3b0edf83b0..3526d5ee4755 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2901,12 +2901,13 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2901 mutex_lock(&priv->mutex); 2901 mutex_lock(&priv->mutex);
2902 iwl_scan_cancel_timeout(priv, 100); 2902 iwl_scan_cancel_timeout(priv, 100);
2903 2903
2904 /* If we are getting WEP group key and we didn't receive any key mapping 2904 /*
2905 * If we are getting WEP group key and we didn't receive any key mapping
2905 * so far, we are in legacy wep mode (group key only), otherwise we are 2906 * so far, we are in legacy wep mode (group key only), otherwise we are
2906 * in 1X mode. 2907 * in 1X mode.
2907 * In legacy wep mode, we use another host command to the uCode */ 2908 * In legacy wep mode, we use another host command to the uCode.
2908 if (key->alg == ALG_WEP && sta_id == priv->hw_params.bcast_sta_id && 2909 */
2909 priv->iw_mode != NL80211_IFTYPE_AP) { 2910 if (key->alg == ALG_WEP && !sta && vif->type != NL80211_IFTYPE_AP) {
2910 if (cmd == SET_KEY) 2911 if (cmd == SET_KEY)
2911 is_default_wep_key = !priv->key_mapping_key; 2912 is_default_wep_key = !priv->key_mapping_key;
2912 else 2913 else