Skip to content

Commit

Permalink
rt2x00: fix use of mcs rates
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Helmut Schaa authored and Ivo van Doorn committed Jun 3, 2010
1 parent c295a81 commit df7f4eb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions drivers/net/wireless/rt2x00/rt2x00ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df7f4eb

Please sign in to comment.