From: Bob Copeland <me@bobcopeland.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] ar9330 autosleep
Date: Fri, 3 Apr 2015 07:48:59 -0400 [thread overview]
Message-ID: <20150403114859.GA6339@localhost> (raw)
In-Reply-To: <21789.63534.378525.962484@gargle.gargle.HOWL>
On Fri, Apr 03, 2015 at 07:47:18AM +0530, Sujith Manoharan wrote:
> Adrian Chadd wrote:
> > I'm still debugging some of the sleep stuff with the AR9380 on
> > FreeBSD. The later chips do the right thing, but the AR9380 beacon
> > programming for /some/ reason is not hearing beacons in network sleep
> > mode and eventually the BMISS interrupts cause a rescan/reassociation.
> > IT doesn't happen on the later chips (AR9485, AR9462, .etc.) sigh.
>
> Relying on the HW TIM interrupt wasn't reliable, IIRC. Instead of
> using ATH9K_INT_TIM to process a beacon which has the TIM bit set
> for our station, ath9k uses ATH9K_INT_TIM_TIMER. AR_TIM_TIMER_EN
> is always enabled in station mode, so power-saving has lots of
> room for improvement, since we completely ignore DTIM and always
> wake up to receive every beacon.
AR_TIM_TIMER_EN is set, but the ATH9K_INT_TIM_TIMER bit seems to be
masked off[1], and the autosleep check in this code in ath_isr would
prevent it doing anything anyway:
if (!(ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
if (status & ATH9K_INT_TIM_TIMER) {
if (ATH_DBG_WARN_ON_ONCE(sc->ps_idle))
goto chip_reset;
/* Clear RxAbort bit so that we can
* receive frames */
ath9k_setpower(sc, ATH9K_PM_AWAKE);
spin_lock(&sc->sc_pm_lock);
ath9k_hw_setrxabort(sc->sc_ah, 0);
sc->ps_flags |= PS_WAIT_FOR_BEACON;
spin_unlock(&sc->sc_pm_lock);
}
So I'm still missing the part where we wake hardware up on this version.
It seemed to work for me though.
[1] code that sets it in ath9k_enable_ps() is surrounded by !AUTOSLEEP
capability check, also ar9003_mac.c is missing the part where we set
TIM_TIMER bit in ISR status based on a generic timer interrupt.
--
Bob Copeland %% http://bobcopeland.com/
next prev parent reply other threads:[~2015-04-03 11:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 18:17 [ath9k-devel] ar9330 autosleep Bob Copeland
2015-04-02 19:28 ` Adrian Chadd
2015-04-03 2:17 ` Sujith Manoharan
2015-04-03 11:48 ` Bob Copeland [this message]
2015-04-04 2:51 ` Sujith Manoharan
2015-04-04 3:06 ` Adrian Chadd
2015-04-06 11:17 ` Bob Copeland
2015-04-07 0:30 ` Sujith Manoharan
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=20150403114859.GA6339@localhost \
--to=me@bobcopeland.com \
--cc=ath9k-devel@lists.ath9k.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.