summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-01-31 09:57:25 (GMT)
committerLuciano Coelho <coelho@ti.com>2012-02-15 06:38:32 (GMT)
commitd18da7fcca449f09c91a209b4f5006959c5a7656 (patch)
treeecc93d55861ee77e3ae6c196014ba281aa07d4bf /drivers/net/wireless/wl12xx/main.c
parented471d3402b0fa77e52007c6f8d79b16c4194000 (diff)
downloadlinux-fsl-qoriq-d18da7fcca449f09c91a209b4f5006959c5a7656.tar.xz
wl12xx: change WLVIF_FLAG_PSM name and remove WLVIF_FLAG_PSM_REQUESTED
WLVIF_FLAG_PSM turned to WLVIF_FLAG_IN_AUTO_PS which marks that this vif is in AUTO PS. WLVIF_FLAG_PSM_REQUESTED is not required as mac80211 calls op_config with CONF_PS after association. wl12xx_config_vif() handling of CONF_PS was simplified and cleaned up. Signed-off-by: Eyal Shapira <eyal@wizery.com> 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.c46
1 files changed, 17 insertions, 29 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 97f7591..4ca7278 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1715,9 +1715,7 @@ static int wl1271_op_start(struct ieee80211_hw *hw)
* is added. That is where we will initialize the hardware.
*/
- wl1271_error("wl12xx is in an ustable state (fw api update is "
- "taking place). skip this commit when bisecting");
- return -EBUSY;
+ return 0;
}
static void wl1271_op_stop(struct ieee80211_hw *hw)
@@ -2460,29 +2458,29 @@ static int wl12xx_config_vif(struct wl1271 *wl, struct wl12xx_vif *wlvif,
}
}
- if (conf->flags & IEEE80211_CONF_PS &&
- !test_bit(WLVIF_FLAG_PSM_REQUESTED, &wlvif->flags)) {
- set_bit(WLVIF_FLAG_PSM_REQUESTED, &wlvif->flags);
+ if ((changed & IEEE80211_CONF_CHANGE_PS) && !is_ap) {
+
+ if ((conf->flags & IEEE80211_CONF_PS) &&
+ test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) &&
+ !test_bit(WLVIF_FLAG_IN_AUTO_PS, &wlvif->flags)) {
+
+ wl1271_debug(DEBUG_PSM, "auto ps enabled");
- /*
- * We enter PSM only if we're already associated.
- * If we're not, we'll enter it when joining an SSID,
- * through the bss_info_changed() hook.
- */
- if (test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags)) {
- wl1271_debug(DEBUG_PSM, "psm enabled");
ret = wl1271_ps_set_mode(wl, wlvif,
STATION_AUTO_PS_MODE);
- }
- } else if (!(conf->flags & IEEE80211_CONF_PS) &&
- test_bit(WLVIF_FLAG_PSM_REQUESTED, &wlvif->flags)) {
- wl1271_debug(DEBUG_PSM, "psm disabled");
+ if (ret < 0)
+ wl1271_warning("enter auto ps failed %d", ret);
- clear_bit(WLVIF_FLAG_PSM_REQUESTED, &wlvif->flags);
+ } else if (!(conf->flags & IEEE80211_CONF_PS) &&
+ test_bit(WLVIF_FLAG_IN_AUTO_PS, &wlvif->flags)) {
+
+ wl1271_debug(DEBUG_PSM, "auto ps disabled");
- if (test_bit(WLVIF_FLAG_PSM, &wlvif->flags))
ret = wl1271_ps_set_mode(wl, wlvif,
STATION_ACTIVE_MODE);
+ if (ret < 0)
+ wl1271_warning("exit auto ps failed %d", ret);
+ }
}
if (conf->power_level != wlvif->power_level) {
@@ -3816,16 +3814,6 @@ sta_not_found:
if (ret < 0)
goto out;
}
-
- /* If we want to go in PSM but we're not there yet */
- if (test_bit(WLVIF_FLAG_PSM_REQUESTED, &wlvif->flags) &&
- !test_bit(WLVIF_FLAG_PSM, &wlvif->flags)) {
-
- ret = wl1271_ps_set_mode(wl, wlvif,
- STATION_AUTO_PS_MODE);
- if (ret < 0)
- goto out;
- }
}
/* Handle new association with HT. Do this after join. */