diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index ac68664690730c02e42cafc4aef355fd167c38fb..9e9fb3fb8f01e697d891bd4b87e833a1620cae0b 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -1406,8 +1406,6 @@ int wl1271_plt_stop(struct wl1271 *wl) goto out; } - wl1271_power_off(wl); - wl->state = WL1271_STATE_OFF; wl->rx_counter = 0; @@ -1417,6 +1415,11 @@ int wl1271_plt_stop(struct wl1271 *wl) wl1271_flush_deferred_work(wl); cancel_work_sync(&wl->netstack_work); cancel_work_sync(&wl->recovery_work); + + mutex_lock(&wl->mutex); + wl1271_power_off(wl); + mutex_unlock(&wl->mutex); + out: return ret; }