diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00ht.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00ht.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00ht.c b/drivers/net/wireless/rt2x00/rt2x00ht.c index 1056c92143a8..5a407602ce3e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00ht.c +++ b/drivers/net/wireless/rt2x00/rt2x00ht.c | |||
@@ -35,6 +35,7 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
35 | { | 35 | { |
36 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); | 36 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); |
37 | struct ieee80211_tx_rate *txrate = &tx_info->control.rates[0]; | 37 | struct ieee80211_tx_rate *txrate = &tx_info->control.rates[0]; |
38 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; | ||
38 | 39 | ||
39 | if (tx_info->control.sta) | 40 | if (tx_info->control.sta) |
40 | txdesc->mpdu_density = | 41 | txdesc->mpdu_density = |
@@ -66,4 +67,20 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
66 | __set_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags); | 67 | __set_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags); |
67 | if (txrate->flags & IEEE80211_TX_RC_SHORT_GI) | 68 | if (txrate->flags & IEEE80211_TX_RC_SHORT_GI) |
68 | __set_bit(ENTRY_TXD_HT_SHORT_GI, &txdesc->flags); | 69 | __set_bit(ENTRY_TXD_HT_SHORT_GI, &txdesc->flags); |
70 | |||
71 | /* | ||
72 | * Determine IFS values | ||
73 | * - Use TXOP_BACKOFF for management frames | ||
74 | * - Use TXOP_SIFS for fragment bursts | ||
75 | * - Use TXOP_HTTXOP for everything else | ||
76 | * | ||
77 | * Note: rt2800 devices won't use CTS protection (if used) | ||
78 | * for frames not transmitted with TXOP_HTTXOP | ||
79 | */ | ||
80 | if (ieee80211_is_mgmt(hdr->frame_control)) | ||
81 | txdesc->txop = TXOP_BACKOFF; | ||
82 | else if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)) | ||
83 | txdesc->txop = TXOP_SIFS; | ||
84 | else | ||
85 | txdesc->txop = TXOP_HTTXOP; | ||
69 | } | 86 | } |