diff options
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/cfg80211.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c index 0372658bac99..3f5a08fa401f 100644 --- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c +++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c | |||
@@ -158,34 +158,6 @@ static int iwm_key_init(struct iwm_key *key, u8 key_index, | |||
158 | return 0; | 158 | return 0; |
159 | } | 159 | } |
160 | 160 | ||
161 | static int iwm_reset_profile(struct iwm_priv *iwm) | ||
162 | { | ||
163 | int ret; | ||
164 | |||
165 | if (!iwm->umac_profile_active) | ||
166 | return 0; | ||
167 | |||
168 | /* | ||
169 | * If there is a current active profile, but no | ||
170 | * default key, it's not worth trying to associate again. | ||
171 | */ | ||
172 | if (iwm->default_key < 0) | ||
173 | return 0; | ||
174 | |||
175 | /* | ||
176 | * Here we have an active profile, but a key setting changed. | ||
177 | * We thus have to invalidate the current profile, and push the | ||
178 | * new one. Keys will be pushed when association takes place. | ||
179 | */ | ||
180 | ret = iwm_invalidate_mlme_profile(iwm); | ||
181 | if (ret < 0) { | ||
182 | IWM_ERR(iwm, "Couldn't invalidate profile\n"); | ||
183 | return ret; | ||
184 | } | ||
185 | |||
186 | return iwm_send_mlme_profile(iwm); | ||
187 | } | ||
188 | |||
189 | static int iwm_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, | 161 | static int iwm_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, |
190 | u8 key_index, const u8 *mac_addr, | 162 | u8 key_index, const u8 *mac_addr, |
191 | struct key_params *params) | 163 | struct key_params *params) |
@@ -245,10 +217,6 @@ static int iwm_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev, | |||
245 | if (key_index == iwm->default_key) | 217 | if (key_index == iwm->default_key) |
246 | iwm->default_key = -1; | 218 | iwm->default_key = -1; |
247 | 219 | ||
248 | /* If the interface is down, we just cache this */ | ||
249 | if (!test_bit(IWM_STATUS_READY, &iwm->status)) | ||
250 | return 0; | ||
251 | |||
252 | return iwm_set_key(iwm, 1, key); | 220 | return iwm_set_key(iwm, 1, key); |
253 | } | 221 | } |
254 | 222 | ||
@@ -257,7 +225,6 @@ static int iwm_cfg80211_set_default_key(struct wiphy *wiphy, | |||
257 | u8 key_index) | 225 | u8 key_index) |
258 | { | 226 | { |
259 | struct iwm_priv *iwm = ndev_to_iwm(ndev); | 227 | struct iwm_priv *iwm = ndev_to_iwm(ndev); |
260 | int ret; | ||
261 | 228 | ||
262 | IWM_DBG_WEXT(iwm, DBG, "Default key index is: %d\n", key_index); | 229 | IWM_DBG_WEXT(iwm, DBG, "Default key index is: %d\n", key_index); |
263 | 230 | ||
@@ -268,15 +235,7 @@ static int iwm_cfg80211_set_default_key(struct wiphy *wiphy, | |||
268 | 235 | ||
269 | iwm->default_key = key_index; | 236 | iwm->default_key = key_index; |
270 | 237 | ||
271 | /* If the interface is down, we just cache this */ | 238 | return iwm_set_tx_key(iwm, key_index); |
272 | if (!test_bit(IWM_STATUS_READY, &iwm->status)) | ||
273 | return 0; | ||
274 | |||
275 | ret = iwm_set_tx_key(iwm, key_index); | ||
276 | if (ret < 0) | ||
277 | return ret; | ||
278 | |||
279 | return iwm_reset_profile(iwm); | ||
280 | } | 239 | } |
281 | 240 | ||
282 | int iwm_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev, | 241 | int iwm_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev, |