diff options
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 43865d1348ec..248daa9bb5fe 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -108,8 +108,7 @@ static void wl1271_reg_notify(struct wiphy *wiphy, | |||
108 | 108 | ||
109 | } | 109 | } |
110 | 110 | ||
111 | if (likely(wl->state == WLCORE_STATE_ON)) | 111 | wlcore_regdomain_config(wl); |
112 | wlcore_regdomain_config(wl); | ||
113 | } | 112 | } |
114 | 113 | ||
115 | static int wl1271_set_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 114 | static int wl1271_set_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
@@ -3364,6 +3363,10 @@ void wlcore_regdomain_config(struct wl1271 *wl) | |||
3364 | return; | 3363 | return; |
3365 | 3364 | ||
3366 | mutex_lock(&wl->mutex); | 3365 | mutex_lock(&wl->mutex); |
3366 | |||
3367 | if (unlikely(wl->state != WLCORE_STATE_ON)) | ||
3368 | goto out; | ||
3369 | |||
3367 | ret = wl1271_ps_elp_wakeup(wl); | 3370 | ret = wl1271_ps_elp_wakeup(wl); |
3368 | if (ret < 0) | 3371 | if (ret < 0) |
3369 | goto out; | 3372 | goto out; |