diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 451d410ecdae..070786ebd076 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -230,8 +230,15 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | |||
230 | /* | 230 | /* |
231 | * Determine retry information. | 231 | * Determine retry information. |
232 | */ | 232 | */ |
233 | txdesc->retry_limit = tx_info->control.retry_limit; | 233 | txdesc->retry_limit = tx_info->control.rates[0].count - 1; |
234 | if (tx_info->flags & IEEE80211_TX_CTL_LONG_RETRY_LIMIT) | 234 | /* |
235 | * XXX: If at this point we knew whether the HW is going to use | ||
236 | * the RETRY_MODE bit or the retry_limit (currently all | ||
237 | * use the RETRY_MODE bit) we could do something like b43 | ||
238 | * does, set the RETRY_MODE bit when the RC algorithm is | ||
239 | * requesting more than the long retry limit. | ||
240 | */ | ||
241 | if (tx_info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) | ||
235 | __set_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags); | 242 | __set_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags); |
236 | 243 | ||
237 | /* | 244 | /* |
@@ -371,10 +378,12 @@ static void rt2x00queue_write_tx_descriptor(struct queue_entry *entry, | |||
371 | 378 | ||
372 | int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb) | 379 | int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb) |
373 | { | 380 | { |
381 | struct ieee80211_tx_info *tx_info; | ||
374 | struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX); | 382 | struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX); |
375 | struct txentry_desc txdesc; | 383 | struct txentry_desc txdesc; |
376 | struct skb_frame_desc *skbdesc; | 384 | struct skb_frame_desc *skbdesc; |
377 | unsigned int iv_len = 0; | 385 | unsigned int iv_len = 0; |
386 | u8 rate_idx, rate_flags; | ||
378 | 387 | ||
379 | if (unlikely(rt2x00queue_full(queue))) | 388 | if (unlikely(rt2x00queue_full(queue))) |
380 | return -EINVAL; | 389 | return -EINVAL; |
@@ -399,13 +408,18 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb) | |||
399 | iv_len = IEEE80211_SKB_CB(skb)->control.hw_key->iv_len; | 408 | iv_len = IEEE80211_SKB_CB(skb)->control.hw_key->iv_len; |
400 | 409 | ||
401 | /* | 410 | /* |
402 | * All information is retreived from the skb->cb array, | 411 | * All information is retrieved from the skb->cb array, |
403 | * now we should claim ownership of the driver part of that | 412 | * now we should claim ownership of the driver part of that |
404 | * array. | 413 | * array, preserving the bitrate index and flags. |
405 | */ | 414 | */ |
415 | tx_info = IEEE80211_SKB_CB(skb); | ||
416 | rate_idx = tx_info->control.rates[0].idx; | ||
417 | rate_flags = tx_info->control.rates[0].flags; | ||
406 | skbdesc = get_skb_frame_desc(entry->skb); | 418 | skbdesc = get_skb_frame_desc(entry->skb); |
407 | memset(skbdesc, 0, sizeof(*skbdesc)); | 419 | memset(skbdesc, 0, sizeof(*skbdesc)); |
408 | skbdesc->entry = entry; | 420 | skbdesc->entry = entry; |
421 | skbdesc->tx_rate_idx = rate_idx; | ||
422 | skbdesc->tx_rate_flags = rate_flags; | ||
409 | 423 | ||
410 | /* | 424 | /* |
411 | * When hardware encryption is supported, and this frame | 425 | * When hardware encryption is supported, and this frame |