Skip to content

Commit

Permalink
wl12xx: add elp wakeup/sleep calls to add_interface
Browse files Browse the repository at this point in the history
add_interface might be called while the chip is
in elp. add elp_wakeup/sleep calls to handle it.

Signed-off-by: Eliad Peller <eliad@wizery.com>
  • Loading branch information
elp committed Oct 10, 2011
1 parent ed13ca3 commit ba81239
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/wireless/wl12xx/main.c
Expand Up @@ -2115,6 +2115,10 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
ieee80211_vif_type_p2p(vif), vif->addr);

mutex_lock(&wl->mutex);
ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto out_unlock;

if (wl->vif) {
wl1271_debug(DEBUG_MAC80211,
"multiple vifs are not supported yet");
Expand Down Expand Up @@ -2190,6 +2194,8 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
list_add(&wlvif->list, &wl->wlvif_list);
set_bit(WLVIF_FLAG_INITIALIZED, &wlvif->flags);
out:
wl1271_ps_elp_sleep(wl);
out_unlock:
mutex_unlock(&wl->mutex);

mutex_lock(&wl_list_mutex);
Expand Down

0 comments on commit ba81239

Please sign in to comment.