aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-01-18 14:15:24 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-22 13:55:01 -0500
commit7490889c105764d80af58dee5983d91a84e4aec8 (patch)
tree2dbd5152c71da46d30cf4a343aa885482c403e5c /drivers/net
parent391429c18f58ae37cc2e254e408bff847f4beb21 (diff)
rt2x00: Fix TX rate short preamble detection
Mac80211 provides 2 structures to handle bitrates, namely ieee80211_rate and ieee80211_tx_rate. To determine the short preamble mode for an outgoing frame, the flag IEEE80211_TX_RC_USE_SHORT_PREAMBLE must be checked on ieee80211_tx_rate and not ieee80211_rate (which rt2x00 did). This fixes a regression which was triggered in 2.6.29-rcX as reported by Chris Clayton. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Tested-By: Chris Clayton <chris2553@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 746a8f36b931..0709decec9c2 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -154,6 +154,7 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
154 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 154 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
155 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); 155 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb);
156 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; 156 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data;
157 struct ieee80211_tx_rate *txrate = &tx_info->control.rates[0];
157 struct ieee80211_rate *rate = 158 struct ieee80211_rate *rate =
158 ieee80211_get_tx_rate(rt2x00dev->hw, tx_info); 159 ieee80211_get_tx_rate(rt2x00dev->hw, tx_info);
159 const struct rt2x00_rate *hwrate; 160 const struct rt2x00_rate *hwrate;
@@ -313,7 +314,7 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
313 * When preamble is enabled we should set the 314 * When preamble is enabled we should set the
314 * preamble bit for the signal. 315 * preamble bit for the signal.
315 */ 316 */
316 if (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) 317 if (txrate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
317 txdesc->signal |= 0x08; 318 txdesc->signal |= 0x08;
318 } 319 }
319} 320}