aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-06-03 10:52:15 +0200
committerIvo van Doorn <IvDoorn@gmail.com>2010-06-03 10:52:15 +0200
commitdf7f4ebe75d04faf6d1eb3b910659199002c7476 (patch)
tree599dcaf87036ee2057c7cd7ec57b2b1ff207b07b /drivers/net/wireless/rt2x00
parentc295a81d0553ab91b196f392ff2c7378ab9d94c4 (diff)
downloadkernel_samsung_aries-df7f4ebe75d04faf6d1eb3b910659199002c7476.zip
kernel_samsung_aries-df7f4ebe75d04faf6d1eb3b910659199002c7476.tar.gz
kernel_samsung_aries-df7f4ebe75d04faf6d1eb3b910659199002c7476.tar.bz2
rt2x00: fix use of mcs rates
In case of mcs rates txrate->idx contains the mcs index to be used for transmission. Previously the mcs values dedicated for legacy rates where used for mcs transmissions which resulted in the use of mcs 0 in a number of cases (e.g. for all mcs rates >= 15 as rt2x00 does not register legacy rates with indexes >= 15). Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00ht.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00ht.c b/drivers/net/wireless/rt2x00/rt2x00ht.c
index 382ab79..c004cd3 100644
--- a/drivers/net/wireless/rt2x00/rt2x00ht.c
+++ b/drivers/net/wireless/rt2x00/rt2x00ht.c
@@ -48,9 +48,18 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry,
txdesc->stbc =
(tx_info->flags & IEEE80211_TX_CTL_STBC) >> IEEE80211_TX_CTL_STBC_SHIFT;
- txdesc->mcs = rt2x00_get_rate_mcs(hwrate->mcs);
- if (txrate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
- txdesc->mcs |= 0x08;
+ /*
+ * If IEEE80211_TX_RC_MCS is set txrate->idx just contains the
+ * mcs rate to be used
+ */
+ if (txrate->flags & IEEE80211_TX_RC_MCS) {
+ txdesc->mcs = txrate->idx;
+ } else {
+ txdesc->mcs = rt2x00_get_rate_mcs(hwrate->mcs);
+ if (txrate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
+ txdesc->mcs |= 0x08;
+ }
+
/*
* Convert flags