linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Tomas Winkler" <tomasw@gmail.com>
To: "Johannes Berg" <johannes@sipsolutions.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	"Ron Rindjunsky" <ron.rindjunsky@intel.com>
Subject: Re: [RFC v2] mac80211: add general rate information to Tx status
Date: Wed, 6 Feb 2008 20:04:01 +0200	[thread overview]
Message-ID: <1ba2fa240802061004u5f4bc2f8q2fbfbb7778121873@mail.gmail.com> (raw)
In-Reply-To: <1202315330.9965.16.camel@johannes.berg>

On Feb 6, 2008 6:28 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>
> > Maybe I'm locked in concepts of iwlwifi but I believe also other
> > drivers uses similar concept. I think USB has some URB complete
> > handler etc.  So iwlwifi get interrupt (asynchronous) when packet is
> > transmitted (TX response flow) and driver retrieves the information of
> > transmitting. This is NOT done in TX contexts so you have to store
> > tx_status between TX flows and TX response flow so you can feed it
> > back to ieee80211_tx_status_irqsafe
>
> Ah. But where's the difference between "TX response" and "TX status"
> then?

There are the same, just terminology juggling.

Anyway, yes, you do have to store the info between ->tx() and
> tx_status().
>
> > Not sure which flow will free this pointer ? Iwlwifi keeps tx_status
> > attached to TBD so it have to be sure it won't be overriden somewhere
> > in the stack.  But it might be a case that I'm not understand here
> > something
>
> I'd think that mac80211 would free it. I guess we should then have
> something like
>
> static inline struct ieee80211_tx_status *
> ieee80211_alloc_tx_status(size_t num_rate_ctrl)
> {
>         struct ieee80211_tx_status *s;
>         s = kzalloc(... the expression you had earlier...);
>         if (s)
>                 s->num_rate_control = num_rate_control;
>         return s;
> }

> so that we can change that w/o changing all drivers. In fact, you'd
> probably already allocate that in the TX flow and keep it around until
> TX status.

It's allocated in <bus>_probe stage. The 'dynamic' allocation is done
only by mac in ieee80211_tx_status_irqsafe.


> Mind you, I'm just writing whatever comes to my head ;) Better ideas
> welcome, especially since this makes tx_status_irqsafe() and tx_status()
> behave completely differently.

I prefer to start to converge to something since iwlwifi driver is
broken for week on the tip of everything.

 Incidentally, why does iwlwifi use both
> depending on in_interrupt(), or rather, why isn't the content statically
> known?

Actually in spite of the IF there I don't think  it  ever happens that
iwlwifi uses tx_status() directly only irqsafe. Does any driver uses
tx_status directly anyway?

Tomas

Tomas
> johannes
>

  reply	other threads:[~2008-02-06 18:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 15:45 [RFC v2] mac80211: add general rate information to Tx status Tomas Winkler
2008-02-05 19:40 ` Tomas Winkler
2008-02-05 22:18   ` Felix Fietkau
2008-02-06 14:15 ` Johannes Berg
2008-02-06 14:44   ` Tomas Winkler
2008-02-06 14:58     ` Johannes Berg
2008-02-06 16:18       ` Tomas Winkler
2008-02-06 16:28         ` Johannes Berg
2008-02-06 18:04           ` Tomas Winkler [this message]
2008-02-07 10:41             ` Johannes Berg
2008-02-07 16:06               ` Nick Kossifidis

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=1ba2fa240802061004u5f4bc2f8q2fbfbb7778121873@mail.gmail.com \
    --to=tomasw@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=ron.rindjunsky@intel.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).