diff options
author | Eliad Peller <eliad@wizery.com> | 2011-10-11 11:49:15 +0200 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-10-11 15:04:23 +0300 |
commit | a4e4130dcea01f3e0dfcbfeaf0d815b971e6e515 (patch) | |
tree | bfc84bbad4246630300677ef4b8a9a1098b3a7a7 /drivers/net/wireless/wl12xx/main.c | |
parent | a32d0cdfcb7e5d41f210e13cbc78dc86a5a85a08 (diff) |
wl12xx: configure sleep_policy according to active roles
If there is an active AP role, stay always on.
Otherwise, allow chip to enter elp.
(Note that this is a global configuration, so if the
device is already configured according to our policy,
we don't have to configure it again)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 0623f5dc02c..b52deac368f 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -2117,6 +2117,11 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw, wl->vif = vif; list_add(&wlvif->list, &wl->wlvif_list); set_bit(WL1271_FLAG_IF_INITIALIZED, &wl->flags); + + if (wlvif->bss_type == BSS_TYPE_AP_BSS) + wl->ap_count++; + else + wl->sta_count++; out: mutex_unlock(&wl->mutex); @@ -2188,6 +2193,11 @@ deinit: wlvif->role_id = WL12XX_INVALID_ROLE_ID; wlvif->dev_role_id = WL12XX_INVALID_ROLE_ID; + if (wlvif->bss_type == BSS_TYPE_AP_BSS) + wl->ap_count--; + else + wl->sta_count--; + mutex_unlock(&wl->mutex); cancel_delayed_work_sync(&wlvif->pspoll_work); |