aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 978604f8ae92..8a3b0edf83b0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -158,6 +158,11 @@ int iwl_commit_rxon(struct iwl_priv *priv)
158 } 158 }
159 iwl_clear_ucode_stations(priv, false); 159 iwl_clear_ucode_stations(priv, false);
160 iwl_restore_stations(priv); 160 iwl_restore_stations(priv);
161 ret = iwl_restore_default_wep_keys(priv);
162 if (ret) {
163 IWL_ERR(priv, "Failed to restore WEP keys (%d)\n", ret);
164 return ret;
165 }
161 } 166 }
162 167
163 IWL_DEBUG_INFO(priv, "Sending RXON\n" 168 IWL_DEBUG_INFO(priv, "Sending RXON\n"
@@ -185,6 +190,11 @@ int iwl_commit_rxon(struct iwl_priv *priv)
185 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); 190 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon));
186 iwl_clear_ucode_stations(priv, false); 191 iwl_clear_ucode_stations(priv, false);
187 iwl_restore_stations(priv); 192 iwl_restore_stations(priv);
193 ret = iwl_restore_default_wep_keys(priv);
194 if (ret) {
195 IWL_ERR(priv, "Failed to restore WEP keys (%d)\n", ret);
196 return ret;
197 }
188 } 198 }
189 199
190 priv->start_calib = 0; 200 priv->start_calib = 0;
@@ -3030,19 +3040,6 @@ static void iwl_mac_sta_notify(struct ieee80211_hw *hw,
3030 } 3040 }
3031} 3041}
3032 3042
3033/**
3034 * iwl_restore_wepkeys - Restore WEP keys to device
3035 */
3036static void iwl_restore_wepkeys(struct iwl_priv *priv)
3037{
3038 mutex_lock(&priv->mutex);
3039 if (priv->iw_mode == NL80211_IFTYPE_STATION &&
3040 priv->default_wep_key &&
3041 iwl_send_static_wepkey_cmd(priv, 0))
3042 IWL_ERR(priv, "Could not send WEP static key\n");
3043 mutex_unlock(&priv->mutex);
3044}
3045
3046static int iwlagn_mac_sta_add(struct ieee80211_hw *hw, 3043static int iwlagn_mac_sta_add(struct ieee80211_hw *hw,
3047 struct ieee80211_vif *vif, 3044 struct ieee80211_vif *vif,
3048 struct ieee80211_sta *sta) 3045 struct ieee80211_sta *sta)
@@ -3069,8 +3066,6 @@ static int iwlagn_mac_sta_add(struct ieee80211_hw *hw,
3069 return ret; 3066 return ret;
3070 } 3067 }
3071 3068
3072 iwl_restore_wepkeys(priv);
3073
3074 /* Initialize rate scaling */ 3069 /* Initialize rate scaling */
3075 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n", 3070 IWL_DEBUG_INFO(priv, "Initializing rate scaling for station %pM\n",
3076 sta->addr); 3071 sta->addr);