Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183377
b: refs/heads/master
c: af5e084
h: refs/heads/master
i:
  183375: e10c691
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Dec 28, 2009
1 parent 7123d8f commit 6dfba13
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13f2dc52c69bcca074cd12d4806953b2af45c386
refs/heads/master: af5e084b3200ab6e3033068a34fe16fd139be17b
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ struct wl1271 {

/* PSM mode requested */
bool psm_requested;
bool associated;

/* retry counter for PSM entries */
u8 psm_entry_retry;
Expand Down
11 changes: 8 additions & 3 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ static void wl1271_op_stop(struct ieee80211_hw *hw)
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;
Expand Down Expand Up @@ -1191,16 +1192,17 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
wl1271_join_channel(wl, channel);

if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested) {
wl1271_info("psm enabled");

wl->psm_requested = true;

/*
* 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.
*/
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");
Expand Down Expand Up @@ -1548,6 +1550,7 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
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
Expand All @@ -1572,6 +1575,7 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
}
} else {
/* use defaults when not associated */
wl->associated = false;
wl->aid = 0;
}

Expand Down Expand Up @@ -1898,6 +1902,7 @@ static int __devinit wl1271_probe(struct spi_device *spi)
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;
Expand Down

0 comments on commit 6dfba13

Please sign in to comment.