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

Commit 84804cdc authored by Ivo van Doorn's avatar Ivo van Doorn Committed by John W. Linville
Browse files

rt2x00: Set MIMO PS flag in tx descriptor for STAs in dynamic SMPS mode

parent 7e613e16
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -437,7 +437,8 @@ void rt2800_write_txwi(__le32 *txwi, struct txentry_desc *txdesc)
	rt2x00_desc_read(txwi, 0, &word);
	rt2x00_set_field32(&word, TXWI_W0_FRAG,
			   test_bit(ENTRY_TXD_MORE_FRAG, &txdesc->flags));
	rt2x00_set_field32(&word, TXWI_W0_MIMO_PS, 0);
	rt2x00_set_field32(&word, TXWI_W0_MIMO_PS,
			   test_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags));
	rt2x00_set_field32(&word, TXWI_W0_CF_ACK, 0);
	rt2x00_set_field32(&word, TXWI_W0_TS,
			   test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags));
+10 −0
Original line number Diff line number Diff line
@@ -54,6 +54,16 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry,
	 */
	if (txrate->flags & IEEE80211_TX_RC_MCS) {
		txdesc->mcs = txrate->idx;

		/*
		 * MIMO PS should be set to 1 for STA's using dynamic SM PS
		 * when using more then one tx stream (>MCS7).
		 */
		if (tx_info->control.sta && txdesc->mcs > 7 &&
		    (tx_info->control.sta->ht_cap.cap &
		     (WLAN_HT_CAP_SM_PS_DYNAMIC <<
		      IEEE80211_HT_CAP_SM_PS_SHIFT)))
			__set_bit(ENTRY_TXD_HT_MIMO_PS, &txdesc->flags);
	} else {
		txdesc->mcs = rt2x00_get_rate_mcs(hwrate->mcs);
		if (txrate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
+2 −0
Original line number Diff line number Diff line
@@ -268,6 +268,7 @@ struct txdone_entry_desc {
 * @ENTRY_TXD_HT_AMPDU: This frame is part of an AMPDU.
 * @ENTRY_TXD_HT_BW_40: Use 40MHz Bandwidth.
 * @ENTRY_TXD_HT_SHORT_GI: Use short GI.
 * @ENTRY_TXD_HT_MIMO_PS: The receiving STA is in dynamic SM PS mode.
 */
enum txentry_desc_flags {
	ENTRY_TXD_RTS_FRAME,
@@ -286,6 +287,7 @@ enum txentry_desc_flags {
	ENTRY_TXD_HT_AMPDU,
	ENTRY_TXD_HT_BW_40,
	ENTRY_TXD_HT_SHORT_GI,
	ENTRY_TXD_HT_MIMO_PS,
};

/**