diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_main.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 4e9754056d45..2eb7b99ff276 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c | |||
@@ -1223,6 +1223,9 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed) | |||
1223 | 1223 | ||
1224 | mutex_lock(&wl->mutex); | 1224 | mutex_lock(&wl->mutex); |
1225 | 1225 | ||
1226 | if (unlikely(wl->state == WL1271_STATE_OFF)) | ||
1227 | goto out; | ||
1228 | |||
1226 | ret = wl1271_ps_elp_wakeup(wl, false); | 1229 | ret = wl1271_ps_elp_wakeup(wl, false); |
1227 | if (ret < 0) | 1230 | if (ret < 0) |
1228 | goto out; | 1231 | goto out; |
@@ -1324,8 +1327,12 @@ static u64 wl1271_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, | |||
1324 | struct dev_addr_list *mc_list) | 1327 | struct dev_addr_list *mc_list) |
1325 | { | 1328 | { |
1326 | struct wl1271_filter_params *fp; | 1329 | struct wl1271_filter_params *fp; |
1330 | struct wl1271 *wl = hw->priv; | ||
1327 | int i; | 1331 | int i; |
1328 | 1332 | ||
1333 | if (unlikely(wl->state == WL1271_STATE_OFF)) | ||
1334 | return 0; | ||
1335 | |||
1329 | fp = kzalloc(sizeof(*fp), GFP_ATOMIC); | 1336 | fp = kzalloc(sizeof(*fp), GFP_ATOMIC); |
1330 | if (!fp) { | 1337 | if (!fp) { |
1331 | wl1271_error("Out of memory setting filters."); | 1338 | wl1271_error("Out of memory setting filters."); |
@@ -1372,15 +1379,16 @@ static void wl1271_op_configure_filter(struct ieee80211_hw *hw, | |||
1372 | 1379 | ||
1373 | mutex_lock(&wl->mutex); | 1380 | mutex_lock(&wl->mutex); |
1374 | 1381 | ||
1375 | if (wl->state == WL1271_STATE_OFF) | 1382 | *total &= WL1271_SUPPORTED_FILTERS; |
1383 | changed &= WL1271_SUPPORTED_FILTERS; | ||
1384 | |||
1385 | if (unlikely(wl->state == WL1271_STATE_OFF)) | ||
1376 | goto out; | 1386 | goto out; |
1377 | 1387 | ||
1378 | ret = wl1271_ps_elp_wakeup(wl, false); | 1388 | ret = wl1271_ps_elp_wakeup(wl, false); |
1379 | if (ret < 0) | 1389 | if (ret < 0) |
1380 | goto out; | 1390 | goto out; |
1381 | 1391 | ||
1382 | *total &= WL1271_SUPPORTED_FILTERS; | ||
1383 | changed &= WL1271_SUPPORTED_FILTERS; | ||
1384 | 1392 | ||
1385 | if (*total & FIF_ALLMULTI) | 1393 | if (*total & FIF_ALLMULTI) |
1386 | ret = wl1271_acx_group_address_tbl(wl, false, NULL, 0); | 1394 | ret = wl1271_acx_group_address_tbl(wl, false, NULL, 0); |