From: Stanislaw Gruszka <sgruszka@redhat.com>
To: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
Parag Warudkar <parag.lkml@gmail.com>,
Jouni Malinen <jouni@qca.qualcomm.com>,
Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>,
linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net,
netdev@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
senthilb@qca.qualcomm.com
Subject: Re: [PATCH] ath9k : Fix ieee80211 work while going to suspend
Date: Thu, 21 Mar 2013 12:42:20 +0100 [thread overview]
Message-ID: <20130321114219.GB1459@redhat.com> (raw)
In-Reply-To: <20130318210308.GD32416@pogo>
On Mon, Mar 18, 2013 at 02:03:08PM -0700, Luis R. Rodriguez wrote:
> > > --- a/drivers/net/wireless/ath/ath9k/link.c
> > > +++ b/drivers/net/wireless/ath/ath9k/link.c
> > > @@ -158,7 +158,8 @@ void ath_start_rx_poll(struct ath_softc *sc, u8 nbeacon)
> > > {
> > > if (!AR_SREV_9300(sc->sc_ah))
> > > return;
> > > -
> > > + if (sc->suspending)
> > > + return;
>
> Thanks for the patch! Please note the style issue here, you should
> use a tab, but other than that lets review what happened.
>
> > > if (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags))
> > > return;
>
> Note that what this will do is call later mod_timer() for
> rx_poll_timer, the right thing to do then, which would
> be equivalent to your patch is to modify the ath_start_rx_poll()
> to instead use the new API mod_timer_pending() added on v2.6.30
> via commit 74019224. This would not re-arm the timer if it was
> previously removed.
[snip]
> - mod_timer(&sc->rx_poll_timer, jiffies + msecs_to_jiffies
> - (nbeacon * sc->cur_beacon_conf.beacon_interval));
> + mod_timer_pending(&sc->rx_poll_timer, jiffies + msecs_to_jiffies
> + (nbeacon * sc->cur_beacon_conf.beacon_interval));
But isn't this prevent to run timer in case it was not running, but
we want to start it ?
> Looking at this makes me think we should review all usage of
> mod_timer all over our 802.11 drivers, and mac80211, cfg80211 as
> well.
I mac80211 we use local->suspended and local->quiesce booleans to
prevent reschedule of timers when going to suspend for example.
Works use ifmgd->associted to prevent reschedule when we are
disassociating.
I think on ath9k also some boolean variable should be used, not only
for rx_poll_timer but also for other works i.e. tx_complete_work.
Is possible to use SC_OP_INVALID flags, since mac80211 call ath9k_stop
on suspend and ath9k_start on resume.
Stanislaw
next prev parent reply other threads:[~2013-03-21 11:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-16 16:38 [PATCH] ath9k : Fix ieee80211 work while going to suspend Parag Warudkar
2013-03-18 19:13 ` John W. Linville
2013-03-18 21:03 ` Luis R. Rodriguez
2013-03-19 1:02 ` Parag Warudkar
2013-03-21 11:42 ` Stanislaw Gruszka [this message]
2013-03-21 19:33 ` Luis R. Rodriguez
2013-03-22 9:13 ` Stanislaw Gruszka
2013-03-22 15:08 ` Luis R. Rodriguez
2013-03-24 16:16 ` Parag Warudkar
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=20130321114219.GB1459@redhat.com \
--to=sgruszka@redhat.com \
--cc=ath9k-devel@venema.h4ckr.net \
--cc=jouni@qca.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=parag.lkml@gmail.com \
--cc=rodrigue@qca.qualcomm.com \
--cc=senthilb@qca.qualcomm.com \
--cc=vthiagar@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).