Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df7f4ebe authored by Helmut Schaa's avatar Helmut Schaa Committed by Ivo van Doorn
Browse files

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: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
parent c295a81d
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -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;

	/*
	 * 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