linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
	rodrigue@qca.qualcomm.com
Subject: Re: [PATCH 3.4] ath9k: wake up the hardware from full sleep when idle is turned off
Date: Fri, 13 Apr 2012 10:04:52 +0200	[thread overview]
Message-ID: <4F87DE24.9040409@openwrt.org> (raw)
In-Reply-To: <20359.36073.677675.375722@gargle.gargle.HOWL>

On 2012-04-13 4:18 AM, Sujith Manoharan wrote:
> Felix Fietkau wrote:
>> The hardware needs a reset to recover from full sleep. Issue this reset
>> directly in the ath9k_config call that turns off idle, otherwise tx
>> remains dead until the first channel change after the idle state change
>> 
>> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
>> ---
>>  drivers/net/wireless/ath/ath9k/main.c |    9 ++++++++-
>>  1 files changed, 8 insertions(+), 1 deletions(-)
>> 
>> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
>> index ba5af8e..fcb13e3 100644
>> --- a/drivers/net/wireless/ath/ath9k/main.c
>> +++ b/drivers/net/wireless/ath/ath9k/main.c
>> @@ -1584,6 +1584,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);
>> @@ -1592,6 +1593,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;
> 
> This doesn't seem to work...
> 
> Since IDLE is broken currently, the HW never enters FULL_SLEEP mode and
> reset_channel will always be zero, and a chip reset will be done only via
> IEEE80211_CONF_CHANGE_CHANNEL.
Consider this preparation for fixing idle mode.

- Felix

      reply	other threads:[~2012-04-13  8:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 18:36 [PATCH 3.4] ath9k: wake up the hardware from full sleep when idle is turned off Felix Fietkau
2012-04-13  2:18 ` Sujith Manoharan
2012-04-13  8:04   ` Felix Fietkau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F87DE24.9040409@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=c_manoha@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rodrigue@qca.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).