aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-10-11 05:49:15 -0400
committerLuciano Coelho <coelho@ti.com>2011-10-11 08:04:23 -0400
commita4e4130dcea01f3e0dfcbfeaf0d815b971e6e515 (patch)
treebfc84bbad4246630300677ef4b8a9a1098b3a7a7 /drivers/net/wireless/wl12xx/main.c
parenta32d0cdfcb7e5d41f210e13cbc78dc86a5a85a08 (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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 0623f5dc02ca..b52deac368f4 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,
2117 wl->vif = vif; 2117 wl->vif = vif;
2118 list_add(&wlvif->list, &wl->wlvif_list); 2118 list_add(&wlvif->list, &wl->wlvif_list);
2119 set_bit(WL1271_FLAG_IF_INITIALIZED, &wl->flags); 2119 set_bit(WL1271_FLAG_IF_INITIALIZED, &wl->flags);
2120
2121 if (wlvif->bss_type == BSS_TYPE_AP_BSS)
2122 wl->ap_count++;
2123 else
2124 wl->sta_count++;
2120out: 2125out:
2121 mutex_unlock(&wl->mutex); 2126 mutex_unlock(&wl->mutex);
2122 2127
@@ -2188,6 +2193,11 @@ deinit:
2188 wlvif->role_id = WL12XX_INVALID_ROLE_ID; 2193 wlvif->role_id = WL12XX_INVALID_ROLE_ID;
2189 wlvif->dev_role_id = WL12XX_INVALID_ROLE_ID; 2194 wlvif->dev_role_id = WL12XX_INVALID_ROLE_ID;
2190 2195
2196 if (wlvif->bss_type == BSS_TYPE_AP_BSS)
2197 wl->ap_count--;
2198 else
2199 wl->sta_count--;
2200
2191 mutex_unlock(&wl->mutex); 2201 mutex_unlock(&wl->mutex);
2192 cancel_delayed_work_sync(&wlvif->pspoll_work); 2202 cancel_delayed_work_sync(&wlvif->pspoll_work);
2193 2203