aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorWinkler, Tomas <tomas.winkler@intel.com>2009-01-19 18:30:22 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:00:54 -0500
commit42986796409a6293351207150edb7b4689b6013d (patch)
tree5c920d2dac0a90a179dff34301ce5c6f59a49a45 /drivers/net/wireless/iwlwifi/iwl-agn.c
parent5cd19c5f15f4bd3354cc7f8f8b1125018a84a25c (diff)
iwlwifi: fix iwl_mac_set_key and iwl3945_mac_set_key
This patch fix iwl_mac_set_key function changed in patch "mac80211: clean up set_key callback" 1. removing 'static' const u8 *addr' that can possible cause conflict when two or more NICs are present in the system. 2. simplifying functions Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index be14cd942a53..7e0baf6deedf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2998,12 +2998,10 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2998 struct ieee80211_key_conf *key) 2998 struct ieee80211_key_conf *key)
2999{ 2999{
3000 struct iwl_priv *priv = hw->priv; 3000 struct iwl_priv *priv = hw->priv;
3001 int ret = 0; 3001 const u8 *addr;
3002 u8 sta_id = IWL_INVALID_STATION; 3002 int ret;
3003 u8 is_default_wep_key = 0; 3003 u8 sta_id;
3004 static const u8 bcast_addr[ETH_ALEN] = 3004 bool is_default_wep_key = false;
3005 { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, };
3006 static const u8 *addr;
3007 3005
3008 IWL_DEBUG_MAC80211("enter\n"); 3006 IWL_DEBUG_MAC80211("enter\n");
3009 3007
@@ -3011,9 +3009,7 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3011 IWL_DEBUG_MAC80211("leave - hwcrypto disabled\n"); 3009 IWL_DEBUG_MAC80211("leave - hwcrypto disabled\n");
3012 return -EOPNOTSUPP; 3010 return -EOPNOTSUPP;
3013 } 3011 }
3014 3012 addr = sta ? sta->addr : iwl_bcast_addr;
3015 addr = sta ? sta->addr : bcast_addr;
3016
3017 sta_id = iwl_find_station(priv, addr); 3013 sta_id = iwl_find_station(priv, addr);
3018 if (sta_id == IWL_INVALID_STATION) { 3014 if (sta_id == IWL_INVALID_STATION) {
3019 IWL_DEBUG_MAC80211("leave - %pM not in station map.\n", 3015 IWL_DEBUG_MAC80211("leave - %pM not in station map.\n",