Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless <linux-wireless@vger.kernel.org>
Cc: Jouni Malinen <j@w1.fi>, Daniel Drake <dsd@gentoo.org>,
	Felix Fietkau <nbd@openwrt.org>
Subject: [RFC] mac80211: fix short preamble determination
Date: Sat, 11 Oct 2008 10:26:33 +0200	[thread overview]
Message-ID: <1223713593.29811.38.camel@johannes.berg> (raw)

When looking at this code during the rate control API rewrite
yesterday, we wondered whether the determination of short
preamble was correct or not. I don't think it was, and this
should be better.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/tx.c |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

--- everything.orig/net/mac80211/tx.c	2008-10-11 10:06:51.000000000 +0200
+++ everything/net/mac80211/tx.c	2008-10-11 10:22:53.000000000 +0200
@@ -474,10 +474,15 @@ ieee80211_tx_h_rate_ctrl(struct ieee8021
 		txrc.rts = rts = true;
 	}
 
-	/* XXX: Is this really the right thing to check? */
-	if (ieee80211_is_data(hdr->frame_control) &&
-	    tx->sdata->vif.bss_conf.use_short_preamble &&
-	    (!tx->sta || test_sta_flags(tx->sta, WLAN_STA_SHORT_PREAMBLE)))
+	/*
+	 * Use short preamble if the BSS can handle it, but not for
+	 * management frames unless we know the receiver can handle
+	 * that -- the management frame might be to a station that
+	 * just wants a probe response.
+	 */
+	if (tx->sdata->vif.bss_conf.use_short_preamble &&
+	    (ieee80211_is_data(hdr->frame_control) ||
+	     (tx->sta && test_sta_flags(tx->sta, WLAN_STA_SHORT_PREAMBLE)))
 		txrc.short_preamble = short_preamble = true;
 
 



             reply	other threads:[~2008-10-11  8:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-11  8:26 Johannes Berg [this message]
2008-10-13 15:59 ` [RFC] mac80211: fix short preamble determination Jouni Malinen
2008-10-13 17:31   ` Johannes Berg
2008-10-13 17:54     ` Jouni Malinen
2008-10-13 18:03       ` Johannes Berg
2008-10-13 18:11         ` Jouni Malinen

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=1223713593.29811.38.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=dsd@gentoo.org \
    --cc=j@w1.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@openwrt.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