aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-02-06 05:47:56 -0500
committerLuciano Coelho <coelho@ti.com>2012-02-15 01:38:36 -0500
commit3dee43930fb48a0746621c99d46318aad8169980 (patch)
treeb8eba799a0f617f63445fe42c6cce9e150618149 /drivers/net/wireless/wl12xx
parent4549d09c57cf44ae9ab6095c375bad5c100658c7 (diff)
wl12xx: enter forced-psm on fw change
Enter forced psm when changing fw, in order to make the sta a bit more disconnection-persistent. (DPM doesn't know about the incoming recovery, so it won't enter psm by itself) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r--drivers/net/wireless/wl12xx/main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index b3b4c4019787..10c1ecdf9bab 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2150,6 +2150,19 @@ static bool wl12xx_need_fw_change(struct wl1271 *wl,
2150 return false; 2150 return false;
2151} 2151}
2152 2152
2153/*
2154 * Enter "forced psm". Make sure the sta is in psm against the ap,
2155 * to make the fw switch a bit more disconnection-persistent.
2156 */
2157static void wl12xx_force_active_psm(struct wl1271 *wl)
2158{
2159 struct wl12xx_vif *wlvif;
2160
2161 wl12xx_for_each_wlvif_sta(wl, wlvif) {
2162 wl1271_ps_set_mode(wl, wlvif, STATION_POWER_SAVE_MODE);
2163 }
2164}
2165
2153static int wl1271_op_add_interface(struct ieee80211_hw *hw, 2166static int wl1271_op_add_interface(struct ieee80211_hw *hw,
2154 struct ieee80211_vif *vif) 2167 struct ieee80211_vif *vif)
2155{ 2168{
@@ -2204,6 +2217,7 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
2204 } 2217 }
2205 2218
2206 if (wl12xx_need_fw_change(wl, vif_count, true)) { 2219 if (wl12xx_need_fw_change(wl, vif_count, true)) {
2220 wl12xx_force_active_psm(wl);
2207 mutex_unlock(&wl->mutex); 2221 mutex_unlock(&wl->mutex);
2208 wl1271_recovery_work(&wl->recovery_work); 2222 wl1271_recovery_work(&wl->recovery_work);
2209 return 0; 2223 return 0;
@@ -2395,6 +2409,7 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
2395 } 2409 }
2396 WARN_ON(iter != wlvif); 2410 WARN_ON(iter != wlvif);
2397 if (wl12xx_need_fw_change(wl, vif_count, false)) { 2411 if (wl12xx_need_fw_change(wl, vif_count, false)) {
2412 wl12xx_force_active_psm(wl);
2398 wl12xx_queue_recovery_work(wl); 2413 wl12xx_queue_recovery_work(wl);
2399 cancel_recovery = false; 2414 cancel_recovery = false;
2400 } 2415 }