Linux wireless drivers development
 help / color / mirror / Atom feed
* [RFC] mac80211: fix short preamble determination
@ 2008-10-11  8:26 Johannes Berg
  2008-10-13 15:59 ` Jouni Malinen
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2008-10-11  8:26 UTC (permalink / raw)
  To: linux-wireless; +Cc: Jouni Malinen, Daniel Drake, Felix Fietkau

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;
 
 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-13 18:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-11  8:26 [RFC] mac80211: fix short preamble determination Johannes Berg
2008-10-13 15:59 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox