diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 44070e66cfed..c05be03907e4 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -4318,7 +4318,7 @@ static int wl12xx_set_bitrate_mask(struct ieee80211_hw *hw, | |||
4318 | { | 4318 | { |
4319 | struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); | 4319 | struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); |
4320 | struct wl1271 *wl = hw->priv; | 4320 | struct wl1271 *wl = hw->priv; |
4321 | int i; | 4321 | int i, ret = 0; |
4322 | 4322 | ||
4323 | wl1271_debug(DEBUG_MAC80211, "mac80211 set_bitrate_mask 0x%x 0x%x", | 4323 | wl1271_debug(DEBUG_MAC80211, "mac80211 set_bitrate_mask 0x%x 0x%x", |
4324 | mask->control[NL80211_BAND_2GHZ].legacy, | 4324 | mask->control[NL80211_BAND_2GHZ].legacy, |
@@ -4331,9 +4331,28 @@ static int wl12xx_set_bitrate_mask(struct ieee80211_hw *hw, | |||
4331 | wl1271_tx_enabled_rates_get(wl, | 4331 | wl1271_tx_enabled_rates_get(wl, |
4332 | mask->control[i].legacy, | 4332 | mask->control[i].legacy, |
4333 | i); | 4333 | i); |
4334 | |||
4335 | if (unlikely(wl->state == WL1271_STATE_OFF)) | ||
4336 | goto out; | ||
4337 | |||
4338 | if (wlvif->bss_type == BSS_TYPE_STA_BSS && | ||
4339 | !test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) { | ||
4340 | |||
4341 | ret = wl1271_ps_elp_wakeup(wl); | ||
4342 | if (ret < 0) | ||
4343 | goto out; | ||
4344 | |||
4345 | wl1271_set_band_rate(wl, wlvif); | ||
4346 | wlvif->basic_rate = | ||
4347 | wl1271_tx_min_rate_get(wl, wlvif->basic_rate_set); | ||
4348 | ret = wl1271_acx_sta_rate_policies(wl, wlvif); | ||
4349 | |||
4350 | wl1271_ps_elp_sleep(wl); | ||
4351 | } | ||
4352 | out: | ||
4334 | mutex_unlock(&wl->mutex); | 4353 | mutex_unlock(&wl->mutex); |
4335 | 4354 | ||
4336 | return 0; | 4355 | return ret; |
4337 | } | 4356 | } |
4338 | 4357 | ||
4339 | static void wl12xx_op_channel_switch(struct ieee80211_hw *hw, | 4358 | static void wl12xx_op_channel_switch(struct ieee80211_hw *hw, |