Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: tomasw <tomasw@gmail.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Ron Rindjunksi <ron.rindjunski@intel.com>
Subject: iwlwifi workaround for mac80211 sequence number bug
Date: Thu, 10 Jul 2008 00:11:25 +0200	[thread overview]
Message-ID: <1215641485.3246.72.camel@johannes.berg> (raw)

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

Ok, so I'm frustrated. I spent a few hours today chasing docs, trying to
understand sequence numbering from the specs, how we implement it in
mac80211 for TX and RX, how hardware/firmware implements it. Finally, I
figure out that mac80211 is buggy, and come up with a buggy (now I know)
patch.

Then, now, I find out that iwlwifi contains a workaround for the
mac80211 sequence numbering, so you've known all along!

Why don't you tell anyone about the problems you find? It can't be that
hard. Are there any other lurking issues like that?

Here's the code from iwlwifi:

        if (ieee80211_is_data_qos(fc)) {
                qc = ieee80211_get_qos_ctl(hdr);
                tid = qc[0] & 0xf;
                seq_number = priv->stations[sta_id].tid[tid].seq_number &
                                IEEE80211_SCTL_SEQ;
                hdr->seq_ctrl = cpu_to_le16(seq_number) |
                        (hdr->seq_ctrl &
                                __constant_cpu_to_le16(IEEE80211_SCTL_FRAG));
                seq_number += 0x10;
                /* aggregation is on for this <sta,tid> */
                if (info->flags & IEEE80211_TX_CTL_AMPDU)
                        txq_id = priv->stations[sta_id].tid[tid].agg.txq_id;
                priv->stations[sta_id].tid[tid].tfds_in_queue++;
        }

We can implement that trivially in mac80211 and make it do the right
thing for all drivers instead of having iwlwifi work around the bug in
mac80211.

Additionally, we can then remove the ssn argument to the ampdu_action
callback.

johannes

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

             reply	other threads:[~2008-07-09 22:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 22:11 Johannes Berg [this message]
2008-07-09 22:17 ` iwlwifi workaround for mac80211 sequence number bug Tomas Winkler
2008-07-09 22:24   ` Johannes Berg
2008-07-09 22:45     ` Tomas Winkler

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=1215641485.3246.72.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=ron.rindjunski@intel.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