Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Tomas Winkler <tomasw@gmail.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	bruno randolf <br1@einfach.org>,
	"Luis R. Rodriguez" <mcgrof@gmail.com>
Subject: Re: mac80211 locking: tasklet vs. non-tasklet
Date: Mon, 25 Feb 2008 10:51:36 +0100	[thread overview]
Message-ID: <1203933096.13162.54.camel@johannes.berg> (raw)
In-Reply-To: <1ba2fa240802240829s7c650ad1yd47c6b25e466a50@mail.gmail.com> (sfid-20080224_162953_401206_88A34DC6)

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]


> >  With iwlwifi, however, there is a possibility that it invokes
> >  ieee80211_tx_status() on one CPU while mac80211's tasklet is processing
> >  another TX status that was submitted with ieee80211_tx_status_irqsafe().
> >  Tomas, I think you mentioned that the TX status processing can't
> >  actually ever call the non-irqsafe version, can we remove that call to
> >  be sure? :)
> 
> Actually alike athk also iwlwifi driver calls tx_status from a tasklet
> therfore the irqsafe can be removed. I've tested that it worked so far

Ok, fine too. Just the mixing is actually bad because of locking.

> However we added start_tx_ba_cb(_irqsafe) callback to get around AMPDU
> queues reordering
> In this case we have to use both handlers so I wonder where we have
> problem here as the same mechanism as tx_status is used.

I think the AMPDU stuff has its own spinlock around the fields it
accesses in those things. The thing with the tx status etc. is that it
uses no locking to update a few sta_info fields. If we added locking
around those accesses, mixing the two irqsafe/non-irqsafe versions would
be acceptable, but I don't see much point in that.

> In general I'm missing some asynchronous mechanism that driver can
> notify mac80211 about it's state.
> Except BA states there  is  for example  netif_carrier_off/on
> functionality in the driver level. It would be very useful for early
> notification of disconnection.  A disconnection can happen due to
> device resume or internal recoverable error. In this cases I would
> expect mac to try associate again upon such trigger.

I guess that's just missing. You can stop the queues but you can't tell
mac80211 that you reset the hw.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2008-02-25  9:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 10:29 mac80211 locking: tasklet vs. non-tasklet Johannes Berg
2008-02-24 16:29 ` Tomas Winkler
2008-02-25  9:51   ` Johannes Berg [this message]
2008-02-25 10:52     ` Tomas Winkler
2008-02-25 10:57       ` Johannes Berg
2008-02-25 11:00         ` Johannes Berg
2008-02-25 11:33           ` Tomas Winkler
2008-02-25 11:36             ` Johannes Berg

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=1203933096.13162.54.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=br1@einfach.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@gmail.com \
    --cc=tomasw@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