]> Pileus Git - ~andy/linux/commitdiff
rt2x00: Move TX descriptor field "ifs" into plcp substruct
authorHelmut Schaa <helmut.schaa@googlemail.com>
Thu, 3 Mar 2011 18:43:25 +0000 (19:43 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 4 Mar 2011 19:06:47 +0000 (14:06 -0500)
"ifs" is only used by no-HT devices. Move it into the plcp substruct and
fill in the value only for no-HT devices.

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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2400pci.c
drivers/net/wireless/rt2x00/rt2500pci.c
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2x00queue.c
drivers/net/wireless/rt2x00/rt2x00queue.h
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rt2x00/rt73usb.c

index 60d75962b805d5a7117509cd3a98f586b8ec77cb..9016c00f2946b19b6bc2187fad32e654384ca288 100644 (file)
@@ -1166,7 +1166,7 @@ static void rt2400pci_write_tx_desc(struct queue_entry *entry,
                           test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags));
        rt2x00_set_field32(&word, TXD_W0_RTS,
                           test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags));
-       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
+       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs);
        rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
                           test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags));
        rt2x00_desc_write(txd, 0, word);
index 53ff64e196489c266e11461faf398a3b29fb2531..0fbc18cb730481e0767f2d4da9a155df71ecadb3 100644 (file)
@@ -1317,7 +1317,7 @@ static void rt2500pci_write_tx_desc(struct queue_entry *entry,
        rt2x00_set_field32(&word, TXD_W0_OFDM,
                           (txdesc->rate_mode == RATE_MODE_OFDM));
        rt2x00_set_field32(&word, TXD_W0_CIPHER_OWNER, 1);
-       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
+       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs);
        rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
                           test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags));
        rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length);
index ed5bc9c6224f35584b4f8270582cf92af8344a1b..979fe6596a2d14bee8424b487f963b847bc81ca0 100644 (file)
@@ -1100,7 +1100,7 @@ static void rt2500usb_write_tx_desc(struct queue_entry *entry,
                           (txdesc->rate_mode == RATE_MODE_OFDM));
        rt2x00_set_field32(&word, TXD_W0_NEW_SEQ,
                           test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags));
-       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
+       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs);
        rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length);
        rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher);
        rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx);
index 7816c1c39d6eaa61fed46917678989ecb443efcb..6300cf309872f00ccddb527aade2b5c7f854c4fe 100644 (file)
@@ -262,6 +262,16 @@ static void rt2x00queue_create_tx_descriptor_plcp(struct queue_entry *entry,
        unsigned int duration;
        unsigned int residual;
 
+       /*
+        * Determine with what IFS priority this frame should be send.
+        * Set ifs to IFS_SIFS when the this is not the first fragment,
+        * or this fragment came after RTS/CTS.
+        */
+       if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags))
+               txdesc->u.plcp.ifs = IFS_BACKOFF;
+       else
+               txdesc->u.plcp.ifs = IFS_SIFS;
+
        /* Data length + CRC + Crypto overhead (IV/EIV/ICV/MIC) */
        data_length = entry->skb->len + 4;
        data_length += rt2x00crypto_tx_overhead(rt2x00dev, entry->skb);
@@ -373,17 +383,9 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
            ieee80211_is_probe_resp(hdr->frame_control))
                __set_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags);
 
-       /*
-        * Determine with what IFS priority this frame should be send.
-        * Set ifs to IFS_SIFS when the this is not the first fragment,
-        * or this fragment came after RTS/CTS.
-        */
        if ((tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) &&
-           !test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags)) {
+           !test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags))
                __set_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags);
-               txdesc->ifs = IFS_BACKOFF;
-       } else
-               txdesc->ifs = IFS_SIFS;
 
        /*
         * Determine rate modulation.
index 3fa2406af7008914778029c93936e47eb1a1bda0..7f8528da03e49c6561ca204792a6215b4d680e78 100644 (file)
@@ -311,6 +311,7 @@ struct txentry_desc {
                        u16 length_low;
                        u16 signal;
                        u16 service;
+                       enum ifs ifs;
                } plcp;
 
                struct {
@@ -325,7 +326,6 @@ struct txentry_desc {
        u16 rate_mode;
 
        short retry_limit;
-       enum ifs ifs;
 
        enum cipher cipher;
        u16 key_idx;
index c01b811a50d5fc8b95481aced399f294e134fa57..a014c64f42752c07cb23e1fec1afd454cd7e1889 100644 (file)
@@ -1948,7 +1948,7 @@ static void rt61pci_write_tx_desc(struct queue_entry *entry,
                           test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags));
        rt2x00_set_field32(&word, TXD_W0_OFDM,
                           (txdesc->rate_mode == RATE_MODE_OFDM));
-       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
+       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs);
        rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
                           test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags));
        rt2x00_set_field32(&word, TXD_W0_TKIP_MIC,
index a4c9a3e20ec45ed84b044ce2093cedb3702ac044..02f1148c577eb1ea01bfa4493c96a98c51d99a59 100644 (file)
@@ -1474,7 +1474,7 @@ static void rt73usb_write_tx_desc(struct queue_entry *entry,
                           test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags));
        rt2x00_set_field32(&word, TXD_W0_OFDM,
                           (txdesc->rate_mode == RATE_MODE_OFDM));
-       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
+       rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs);
        rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
                           test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags));
        rt2x00_set_field32(&word, TXD_W0_TKIP_MIC,