diff options
| author | James Morris <james.l.morris@oracle.com> | 2012-05-04 12:46:40 +1000 | 
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2012-05-04 12:46:40 +1000 | 
| commit | 898bfc1d46bd76f8ea2a0fbd239dd2073efe2aa3 (patch) | |
| tree | e6e666085abe674dbf6292555961fe0a0f2e2d2f /drivers/net/wireless/ath/ath9k/main.c | |
| parent | 08162e6a23d476544adfe1164afe9ea8b34ab859 (diff) | |
| parent | 69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff) | |
| download | olio-linux-3.10-898bfc1d46bd76f8ea2a0fbd239dd2073efe2aa3.tar.xz olio-linux-3.10-898bfc1d46bd76f8ea2a0fbd239dd2073efe2aa3.zip  | |
Merge tag 'v3.4-rc5' into next
Linux 3.4-rc5
Merge to pull in prerequisite change for Smack:
86812bb0de1a3758dc6c7aa01a763158a7c0638a
Requested by Casey.
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 17 | 
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 215eb2536b1..798ea57252b 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -118,15 +118,13 @@ void ath9k_ps_restore(struct ath_softc *sc)  	if (--sc->ps_usecount != 0)  		goto unlock; -	if (sc->ps_flags & PS_WAIT_FOR_TX_ACK) -		goto unlock; - -	if (sc->ps_idle) +	if (sc->ps_idle && (sc->ps_flags & PS_WAIT_FOR_TX_ACK))  		mode = ATH9K_PM_FULL_SLEEP;  	else if (sc->ps_enabled &&  		 !(sc->ps_flags & (PS_WAIT_FOR_BEACON |  			      PS_WAIT_FOR_CAB | -			      PS_WAIT_FOR_PSPOLL_DATA))) +			      PS_WAIT_FOR_PSPOLL_DATA | +			      PS_WAIT_FOR_TX_ACK)))  		mode = ATH9K_PM_NETWORK_SLEEP;  	else  		goto unlock; @@ -1550,6 +1548,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)  	struct ath_hw *ah = sc->sc_ah;  	struct ath_common *common = ath9k_hw_common(ah);  	struct ieee80211_conf *conf = &hw->conf; +	bool reset_channel = false;  	ath9k_ps_wakeup(sc);  	mutex_lock(&sc->mutex); @@ -1558,6 +1557,12 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)  		sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);  		if (sc->ps_idle)  			ath_cancel_work(sc); +		else +			/* +			 * The chip needs a reset to properly wake up from +			 * full sleep +			 */ +			reset_channel = ah->chip_fullsleep;  	}  	/* @@ -1586,7 +1591,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)  		}  	} -	if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { +	if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {  		struct ieee80211_channel *curchan = hw->conf.channel;  		int pos = curchan->hw_value;  		int old_pos = -1;  |