Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ivo van Doorn and committed by
John W. Linville
7490889c 391429c1

+2 -1
+2 -1
drivers/net/wireless/rt2x00/rt2x00queue.c
··· 154 154 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 155 155 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); 156 156 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; 157 + struct ieee80211_tx_rate *txrate = &tx_info->control.rates[0]; 157 158 struct ieee80211_rate *rate = 158 159 ieee80211_get_tx_rate(rt2x00dev->hw, tx_info); 159 160 const struct rt2x00_rate *hwrate; ··· 314 313 * When preamble is enabled we should set the 315 314 * preamble bit for the signal. 316 315 */ 317 - if (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) 316 + if (txrate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) 318 317 txdesc->signal |= 0x08; 319 318 } 320 319 }