linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Pedersen <twpedersen@gmail.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	open80211s <devel@lists.open80211s.org>
Subject: Re: [PATCH v3 1/2] mac80211_hwsim: fix duplicate beacons on TSF adjust
Date: Wed, 15 Jan 2014 21:04:44 +0100	[thread overview]
Message-ID: <1389816284.4338.22.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CAHmEv86K7br1c0ES1N0dWeAoPfJaaiy8+rAXAjoiUOwophhY_A@mail.gmail.com> (sfid-20140115_185607_818730_16B2261B)

On Wed, 2014-01-15 at 09:55 -0800, Thomas Pedersen wrote:

> >> +     if (!hrtimer_callback_running(&data->beacon_timer.timer) &&
> >> +         !test_bit(TASKLET_STATE_RUN, &data->beacon_timer.tasklet.state))
> >> +             tasklet_hrtimer_cancel(&data->beacon_timer);
> >
> > That test_bit() really seems suspicious - there are no other users in
> > the tree except for the internal tasklet code... What are you trying to
> > do?
> 
> I'm trying to avoid calling tasklet_hrtimer_cancel() recursively, that
> is, when mac80211_hwsim_beacon_sched() is called from within the
> hrtimer tasklet itself. Looking at it again this does seem ugly. Would
> it be acceptable to pass a flag to _beacon_sched() indicating whether
> a reschedule is taking place from within the tasklet? 

That seems fine to me.

> We could also
> have a mac80211_hwsim_beacon_sched() (which would cance the hrtimer
> tasklet) and __mac80211_hwsim_beacon_sched() pair, but I'm not sure if
> that nomenclature applies here.

Whichever causes less code duplication? Could one call the other maybe?
Dunno, up to you. I was really just thinking that the test_bit() was odd
since nobody else uses it.

johannes


      reply	other threads:[~2014-01-15 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 18:25 [PATCH v3 1/2] mac80211_hwsim: fix duplicate beacons on TSF adjust Thomas Pedersen
2013-12-19 18:25 ` [PATCH v3 2/2] mac80211: sync dtim_count to TSF Thomas Pedersen
2014-01-06 19:11   ` Johannes Berg
2014-01-06 19:09 ` [PATCH v3 1/2] mac80211_hwsim: fix duplicate beacons on TSF adjust Johannes Berg
2014-01-15 17:55   ` Thomas Pedersen
2014-01-15 20:04     ` Johannes Berg [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=1389816284.4338.22.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=devel@lists.open80211s.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=twpedersen@gmail.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).