From: Helmut Schaa <helmut.schaa-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: Zhu Yi <yi.zhu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Jouni Malinen <j@w1.fi>
Subject: Re: [Ipw2100-devel] ipw2100: race between isr_indicate_associated and rx path
Date: Wed, 25 Feb 2009 13:39:59 +0100 [thread overview]
Message-ID: <200902251340.02010.helmut.schaa@gmail.com> (raw)
In-Reply-To: <1235524696.6354.562.camel@debian>
Am Mittwoch, 25. Februar 2009 schrieb Zhu Yi:
> Make sense. Whatever there is race here but either the driver or the
> user space is able to control and avoid it.
>
> BTW, does wpa_supplicant start to receive EAPOL frames after it gets the
> association event?
Yep.
> [...]
>
> > > But in wireless,
> > > netif_carrier_on() is usually called after an association is succeeded.
> > > The driver has already some management frames transfered with AP. Now
> > > it's the time to open the data frame transmission. The driver requires
> > > to get the activate_dev() result (synchronously or via callback) because
> > > otherwise the driver has no idea when the Qdisc is ready and then it can
> > > start to deliver data frames to network stack and user space.
> >
> > Exactly.
>
> Looks like we didn't bring enough attention for netdev people on this.
> Should you change the title to remove ipw2100? It should be a generic
> issue for the current netif_carrier_on/dev_activate() implementation.
Argh! Just found out why dev_activate is called such late after
netif_carrier_on:
ipw2100 calls netif_carrier_on followed by netif_wake_queue when the driver
moves from associating to associated state. netif_carrier_on will then
call linkwatch_fire_event. However the carrier_on event is not treated as
urgent and as such the event is delayed (and thus dev_activate too).
An event is considered urgent if the netdev is running, has a carrier
_and_ any of the TX qdiscs changed. Since ipw2100 first calls carrier_on,
the last condition is not met and thus the event is not considered urgent
and gets delayed.
Just changing the order to first wake up the queues followed by the
carrier_on results in an urgent event. I ran a few tests with that change
(+ frame buffering patch) and wasn't able to trigger the race again.
I'll fold that into the frame buffer patch and send it to ipw2100-devel
once I finished the tests.
Helmut
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-02-25 12:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200901211734.48625.helmut.schaa@gmail.com>
[not found] ` <200901271521.24395.helmut.schaa@gmail.com>
[not found] ` <200902051511.31268.helmut.schaa@gmail.com>
2009-02-23 10:38 ` [Ipw2100-devel] ipw2100: race between isr_indicate_associated and rx path Helmut Schaa
2009-02-23 18:08 ` Jouni Malinen
2009-02-24 7:36 ` Helmut Schaa
[not found] ` <200902231138.58067.helmut.schaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-24 3:34 ` Zhu Yi
2009-02-24 12:15 ` Helmut Schaa
[not found] ` <200902241315.43128.helmut.schaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-25 1:18 ` Zhu Yi
2009-02-25 12:39 ` Helmut Schaa [this message]
[not found] ` <200902251340.02010.helmut.schaa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-27 0:55 ` Zhu Yi
2009-03-03 11:33 ` Helmut Schaa
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=200902251340.02010.helmut.schaa@gmail.com \
--to=helmut.schaa-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
--cc=j@w1.fi \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yi.zhu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 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).