]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
rt2x00: Allow tx duplication for legacy rates in HT40 mode
authorHelmut Schaa <helmut.schaa@googlemail.com>
Sat, 2 Oct 2010 09:29:59 +0000 (11:29 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 5 Oct 2010 17:35:27 +0000 (13:35 -0400)
Make use of the IEEE80211_TX_RC_DUP_DATA flag to duplicate a
transmission with legacy rates to both 20Mhz channels if set.
Also update the related comment in rt2800.h to describe the
behavior of the BW_40 flag for legacy rates.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800.h
drivers/net/wireless/rt2x00/rt2x00ht.c

index e1583cf5894bd2cfab2e9b5b0f21c8e1d6448ab0..9bf50a1c48d067ead71e4783173562df0cd0aee3 100644 (file)
@@ -1982,7 +1982,8 @@ struct mac_iveiv_entry {
  * FRAG: 1 To inform TKIP engine this is a fragment.
  * MIMO_PS: The remote peer is in dynamic MIMO-PS mode
  * TX_OP: 0:HT TXOP rule , 1:PIFS TX ,2:Backoff, 3:sifs
- * BW: Channel bandwidth 20MHz or 40 MHz
+ * BW: Channel bandwidth 0:20MHz, 1:40 MHz (for legacy rates this will
+ *     duplicate the frame to both channels).
  * STBC: 1: STBC support MCS =0-7, 2,3 : RESERVED
  * AMPDU: 1: this frame is eligible for AMPDU aggregation, the hw will
  *        aggregate consecutive frames with the same RA and QoS TID.
index 48b6ed426da5fc0cff19147c51d584a22691005d..2023419ce0bd27774dbd5431c8d8fb298b2509bc 100644 (file)
@@ -85,7 +85,13 @@ void rt2x00ht_create_tx_descriptor(struct queue_entry *entry,
                txdesc->rate_mode = RATE_MODE_HT_MIX;
        if (txrate->flags & IEEE80211_TX_RC_GREEN_FIELD)
                txdesc->rate_mode = RATE_MODE_HT_GREENFIELD;
-       if (txrate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
+
+       /*
+        * Set 40Mhz mode if necessary (for legacy rates this will
+        * duplicate the frame to both channels).
+        */
+       if (txrate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH ||
+           txrate->flags & IEEE80211_TX_RC_DUP_DATA)
                __set_bit(ENTRY_TXD_HT_BW_40, &txdesc->flags);
        if (txrate->flags & IEEE80211_TX_RC_SHORT_GI)
                __set_bit(ENTRY_TXD_HT_SHORT_GI, &txdesc->flags);