diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00ht.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00ht.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00ht.c b/drivers/net/wireless/rt2x00/rt2x00ht.c index ad3c7ff4837b..c637bcaec5f8 100644 --- a/drivers/net/wireless/rt2x00/rt2x00ht.c +++ b/drivers/net/wireless/rt2x00/rt2x00ht.c | |||
@@ -60,9 +60,10 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
60 | * when using more then one tx stream (>MCS7). | 60 | * when using more then one tx stream (>MCS7). |
61 | */ | 61 | */ |
62 | if (tx_info->control.sta && txdesc->mcs > 7 && | 62 | if (tx_info->control.sta && txdesc->mcs > 7 && |
63 | (tx_info->control.sta->ht_cap.cap & | 63 | ((tx_info->control.sta->ht_cap.cap & |
64 | (WLAN_HT_CAP_SM_PS_DYNAMIC << | 64 | IEEE80211_HT_CAP_SM_PS) >> |
65 | IEEE80211_HT_CAP_SM_PS_SHIFT))) | 65 | IEEE80211_HT_CAP_SM_PS_SHIFT) == |
66 | WLAN_HT_CAP_SM_PS_DYNAMIC) | ||
66 | __set_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags); | 67 | __set_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags); |
67 | } else { | 68 | } else { |
68 | txdesc->mcs = rt2x00_get_rate_mcs(hwrate->mcs); | 69 | txdesc->mcs = rt2x00_get_rate_mcs(hwrate->mcs); |
@@ -72,9 +73,11 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
72 | 73 | ||
73 | 74 | ||
74 | /* | 75 | /* |
75 | * 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. | ||
76 | */ | 78 | */ |
77 | 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)) | ||
78 | __set_bit(ENTRY_TXD_HT_AMPDU, &txdesc->flags); | 81 | __set_bit(ENTRY_TXD_HT_AMPDU, &txdesc->flags); |
79 | 82 | ||
80 | /* | 83 | /* |
@@ -84,7 +87,13 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
84 | txdesc->rate_mode = RATE_MODE_HT_MIX; | 87 | txdesc->rate_mode = RATE_MODE_HT_MIX; |
85 | if (txrate->flags & IEEE80211_TX_RC_GREEN_FIELD) | 88 | if (txrate->flags & IEEE80211_TX_RC_GREEN_FIELD) |
86 | txdesc->rate_mode = RATE_MODE_HT_GREENFIELD; | 89 | txdesc->rate_mode = RATE_MODE_HT_GREENFIELD; |
87 | 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) | ||
88 | __set_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags); | 97 | __set_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags); |
89 | if (txrate->flags & IEEE80211_TX_RC_SHORT_GI) | 98 | if (txrate->flags & IEEE80211_TX_RC_SHORT_GI) |
90 | __set_bit(ENTRY_TXD_HT_SHORT_GI, &txdesc->flags); | 99 | __set_bit(ENTRY_TXD_HT_SHORT_GI, &txdesc->flags); |