diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index d7a74597fd59..357dc9d99945 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -1610,10 +1610,13 @@ static struct notifier_block wl1271_dev_notifier = { | |||
1610 | #ifdef CONFIG_PM | 1610 | #ifdef CONFIG_PM |
1611 | static int wl1271_configure_suspend_sta(struct wl1271 *wl) | 1611 | static int wl1271_configure_suspend_sta(struct wl1271 *wl) |
1612 | { | 1612 | { |
1613 | int ret; | 1613 | int ret = 0; |
1614 | 1614 | ||
1615 | mutex_lock(&wl->mutex); | 1615 | mutex_lock(&wl->mutex); |
1616 | 1616 | ||
1617 | if (!test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) | ||
1618 | goto out_unlock; | ||
1619 | |||
1617 | ret = wl1271_ps_elp_wakeup(wl); | 1620 | ret = wl1271_ps_elp_wakeup(wl); |
1618 | if (ret < 0) | 1621 | if (ret < 0) |
1619 | goto out_unlock; | 1622 | goto out_unlock; |
@@ -1658,10 +1661,13 @@ out: | |||
1658 | 1661 | ||
1659 | static int wl1271_configure_suspend_ap(struct wl1271 *wl) | 1662 | static int wl1271_configure_suspend_ap(struct wl1271 *wl) |
1660 | { | 1663 | { |
1661 | int ret; | 1664 | int ret = 0; |
1662 | 1665 | ||
1663 | mutex_lock(&wl->mutex); | 1666 | mutex_lock(&wl->mutex); |
1664 | 1667 | ||
1668 | if (!test_bit(WL1271_FLAG_AP_STARTED, &wl->flags)) | ||
1669 | goto out_unlock; | ||
1670 | |||
1665 | ret = wl1271_ps_elp_wakeup(wl); | 1671 | ret = wl1271_ps_elp_wakeup(wl); |
1666 | if (ret < 0) | 1672 | if (ret < 0) |
1667 | goto out_unlock; | 1673 | goto out_unlock; |