diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00ht.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00ht.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00ht.c b/drivers/net/wireless/rt2x00/rt2x00ht.c index c004cd3a8847..c637bcaec5f8 100644 --- a/drivers/net/wireless/rt2x00/rt2x00ht.c +++ b/drivers/net/wireless/rt2x00/rt2x00ht.c | |||
@@ -54,6 +54,17 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
54 | */ | 54 | */ |
55 | if (txrate->flags & IEEE80211_TX_RC_MCS) { | 55 | if (txrate->flags & IEEE80211_TX_RC_MCS) { |
56 | txdesc->mcs = txrate->idx; | 56 | txdesc->mcs = txrate->idx; |
57 | |||
58 | /* | ||
59 | * MIMO PS should be set to 1 for STA's using dynamic SM PS | ||
60 | * when using more then one tx stream (>MCS7). | ||
61 | */ | ||
62 | if (tx_info->control.sta && txdesc->mcs > 7 && | ||
63 | ((tx_info->control.sta->ht_cap.cap & | ||
64 | IEEE80211_HT_CAP_SM_PS) >> | ||
65 | IEEE80211_HT_CAP_SM_PS_SHIFT) == | ||
66 | WLAN_HT_CAP_SM_PS_DYNAMIC) | ||
67 | __set_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags); | ||
57 | } else { | 68 | } else { |
58 | txdesc->mcs = rt2x00_get_rate_mcs(hwrate->mcs); | 69 | txdesc->mcs = rt2x00_get_rate_mcs(hwrate->mcs); |
59 | if (txrate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) | 70 | if (txrate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) |
@@ -62,9 +73,11 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
62 | 73 | ||
63 | 74 | ||
64 | /* | 75 | /* |
65 | * Convert flags | 76 | * This frame is eligible for an AMPDU, however, don't aggregate |
77 | * frames that are intended to probe a specific tx rate. | ||
66 | */ | 78 | */ |
67 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) | 79 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU && |
80 | !(tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)) | ||
68 | __set_bit(ENTRY_TXD_HT_AMPDU, &txdesc->flags); | 81 | __set_bit(ENTRY_TXD_HT_AMPDU, &txdesc->flags); |
69 | 82 | ||
70 | /* | 83 | /* |
@@ -74,7 +87,13 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
74 | txdesc->rate_mode = RATE_MODE_HT_MIX; | 87 | txdesc->rate_mode = RATE_MODE_HT_MIX; |
75 | if (txrate->flags & IEEE80211_TX_RC_GREEN_FIELD) | 88 | if (txrate->flags & IEEE80211_TX_RC_GREEN_FIELD) |
76 | txdesc->rate_mode = RATE_MODE_HT_GREENFIELD; | 89 | txdesc->rate_mode = RATE_MODE_HT_GREENFIELD; |
77 | if (txrate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) | 90 | |
91 | /* | ||
92 | * Set 40Mhz mode if necessary (for legacy rates this will | ||
93 | * duplicate the frame to both channels). | ||
94 | */ | ||
95 | if (txrate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH || | ||
96 | txrate->flags & IEEE80211_TX_RC_DUP_DATA) | ||
78 | __set_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags); | 97 | __set_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags); |
79 | if (txrate->flags & IEEE80211_TX_RC_SHORT_GI) | 98 | if (txrate->flags & IEEE80211_TX_RC_SHORT_GI) |
80 | __set_bit(ENTRY_TXD_HT_SHORT_GI, &txdesc->flags); | 99 | __set_bit(ENTRY_TXD_HT_SHORT_GI, &txdesc->flags); |