diff options
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/main.c')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/main.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/main.c b/drivers/net/wireless/iwmc3200wifi/main.c index fc7fce44a9d7..6a5b76acb645 100644 --- a/drivers/net/wireless/iwmc3200wifi/main.c +++ b/drivers/net/wireless/iwmc3200wifi/main.c | |||
@@ -187,7 +187,8 @@ static void iwm_reset_worker(struct work_struct *work) | |||
187 | memcpy(iwm->umac_profile, profile, sizeof(*profile)); | 187 | memcpy(iwm->umac_profile, profile, sizeof(*profile)); |
188 | iwm_send_mlme_profile(iwm); | 188 | iwm_send_mlme_profile(iwm); |
189 | kfree(profile); | 189 | kfree(profile); |
190 | } | 190 | } else |
191 | clear_bit(IWM_STATUS_RESETTING, &iwm->status); | ||
191 | 192 | ||
192 | out: | 193 | out: |
193 | mutex_unlock(&iwm->mutex); | 194 | mutex_unlock(&iwm->mutex); |
@@ -200,7 +201,7 @@ static void iwm_watchdog(unsigned long data) | |||
200 | IWM_WARN(iwm, "Watchdog expired: UMAC stalls!\n"); | 201 | IWM_WARN(iwm, "Watchdog expired: UMAC stalls!\n"); |
201 | 202 | ||
202 | if (modparam_reset) | 203 | if (modparam_reset) |
203 | schedule_work(&iwm->reset_worker); | 204 | iwm_resetting(iwm); |
204 | } | 205 | } |
205 | 206 | ||
206 | int iwm_priv_init(struct iwm_priv *iwm) | 207 | int iwm_priv_init(struct iwm_priv *iwm) |
@@ -284,7 +285,11 @@ void iwm_reset(struct iwm_priv *iwm) | |||
284 | if (test_bit(IWM_STATUS_READY, &iwm->status)) | 285 | if (test_bit(IWM_STATUS_READY, &iwm->status)) |
285 | iwm_target_reset(iwm); | 286 | iwm_target_reset(iwm); |
286 | 287 | ||
287 | iwm->status = 0; | 288 | if (test_bit(IWM_STATUS_RESETTING, &iwm->status)) { |
289 | iwm->status = 0; | ||
290 | set_bit(IWM_STATUS_RESETTING, &iwm->status); | ||
291 | } else | ||
292 | iwm->status = 0; | ||
288 | iwm->scan_id = 1; | 293 | iwm->scan_id = 1; |
289 | 294 | ||
290 | list_for_each_entry_safe(notif, next, &iwm->pending_notif, pending) { | 295 | list_for_each_entry_safe(notif, next, &iwm->pending_notif, pending) { |
@@ -300,6 +305,13 @@ void iwm_reset(struct iwm_priv *iwm) | |||
300 | iwm_link_off(iwm); | 305 | iwm_link_off(iwm); |
301 | } | 306 | } |
302 | 307 | ||
308 | void iwm_resetting(struct iwm_priv *iwm) | ||
309 | { | ||
310 | set_bit(IWM_STATUS_RESETTING, &iwm->status); | ||
311 | |||
312 | schedule_work(&iwm->reset_worker); | ||
313 | } | ||
314 | |||
303 | /* | 315 | /* |
304 | * Notification code: | 316 | * Notification code: |
305 | * | 317 | * |