aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_event.c3
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c3
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_ps.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_event.c b/drivers/net/wireless/wl12xx/wl1271_event.c
index bced8296a251..e6c839af9038 100644
--- a/drivers/net/wireless/wl12xx/wl1271_event.c
+++ b/drivers/net/wireless/wl12xx/wl1271_event.c
@@ -41,6 +41,9 @@ void wl1271_pspoll_work(struct work_struct *work)
41 41
42 mutex_lock(&wl->mutex); 42 mutex_lock(&wl->mutex);
43 43
44 if (unlikely(wl->state == WL1271_STATE_OFF))
45 goto out;
46
44 if (!test_and_clear_bit(WL1271_FLAG_PSPOLL_FAILURE, &wl->flags)) 47 if (!test_and_clear_bit(WL1271_FLAG_PSPOLL_FAILURE, &wl->flags))
45 goto out; 48 goto out;
46 49
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 0026e775bb0d..9ab4fc4f7b4b 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -792,6 +792,8 @@ int wl1271_plt_stop(struct wl1271 *wl)
792out: 792out:
793 mutex_unlock(&wl->mutex); 793 mutex_unlock(&wl->mutex);
794 794
795 cancel_work_sync(&wl->irq_work);
796
795 return ret; 797 return ret;
796} 798}
797 799
@@ -995,6 +997,7 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
995 cancel_work_sync(&wl->irq_work); 997 cancel_work_sync(&wl->irq_work);
996 cancel_work_sync(&wl->tx_work); 998 cancel_work_sync(&wl->tx_work);
997 cancel_delayed_work_sync(&wl->pspoll_work); 999 cancel_delayed_work_sync(&wl->pspoll_work);
1000 cancel_delayed_work_sync(&wl->elp_work);
998 1001
999 mutex_lock(&wl->mutex); 1002 mutex_lock(&wl->mutex);
1000 1003
diff --git a/drivers/net/wireless/wl12xx/wl1271_ps.c b/drivers/net/wireless/wl12xx/wl1271_ps.c
index f75668e413fd..150dc674d8b4 100644
--- a/drivers/net/wireless/wl12xx/wl1271_ps.c
+++ b/drivers/net/wireless/wl12xx/wl1271_ps.c
@@ -39,6 +39,9 @@ void wl1271_elp_work(struct work_struct *work)
39 39
40 mutex_lock(&wl->mutex); 40 mutex_lock(&wl->mutex);
41 41
42 if (unlikely(wl->state == WL1271_STATE_OFF))
43 goto out;
44
42 if (test_bit(WL1271_FLAG_IN_ELP, &wl->flags) || 45 if (test_bit(WL1271_FLAG_IN_ELP, &wl->flags) ||
43 (!test_bit(WL1271_FLAG_PSM, &wl->flags) && 46 (!test_bit(WL1271_FLAG_PSM, &wl->flags) &&
44 !test_bit(WL1271_FLAG_IDLE, &wl->flags))) 47 !test_bit(WL1271_FLAG_IDLE, &wl->flags)))