wl->elp = false;
wl->psm = 0;
wl->psm_entry_retry = 0;
+ wl->associated = false;
wl->tx_queue_stopped = false;
wl->power_level = WL1271_DEFAULT_POWER_LEVEL;
wl->tx_blocks_available = 0;
wl1271_join_channel(wl, channel);
if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested) {
- wl1271_info("psm enabled");
-
wl->psm_requested = true;
/*
* If we're not, we'll enter it when joining an SSID,
* through the bss_info_changed() hook.
*/
- ret = wl1271_ps_set_mode(wl, STATION_POWER_SAVE_MODE);
+ if (wl->associated) {
+ wl1271_info("psm enabled");
+ ret = wl1271_ps_set_mode(wl, STATION_POWER_SAVE_MODE);
+ }
} else if (!(conf->flags & IEEE80211_CONF_PS) &&
wl->psm_requested) {
wl1271_info("psm disabled");
if (changed & BSS_CHANGED_ASSOC) {
if (bss_conf->assoc) {
wl->aid = bss_conf->aid;
+ wl->associated = true;
/*
* with wl1271, we don't need to update the
}
} else {
/* use defaults when not associated */
+ wl->associated = false;
wl->aid = 0;
}
wl->psm = 0;
wl->psm_requested = false;
wl->psm_entry_retry = 0;
+ wl->associated = false;
wl->tx_queue_stopped = false;
wl->power_level = WL1271_DEFAULT_POWER_LEVEL;
wl->basic_rate_set = CONF_TX_RATE_MASK_BASIC;