Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2700f8b0489e00cb6eead31e58f5461812dd31a6
Commit:     2700f8b0489e00cb6eead31e58f5461812dd31a6
Parent:     3d82346c5d0ff0a413c387c6edaadc0ca29a0971
Author:     Mattias Nissler <[EMAIL PROTECTED]>
AuthorDate: Sat Oct 27 13:43:49 2007 +0200
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:03:04 2008 -0800

    rt2x00: Correctly set ACK bit in tx descriptors
    
    Add a flag to struct txdata_entry_desc that specifies whether an ack for the
    frame is to be expected. Use this flag to set the ACK bit in the tx 
descriptor.
    Previously, the ACK bit could be set incorrectly on CTS-to-self frames, so 
they
    caused retries and were reported to be failed in the txdone handlers.
    
    Signed-off-by: Mattias Nissler <[EMAIL PROTECTED]>
    Signed-off-by: Ivo van Doorn <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/wireless/rt2x00/rt2400pci.c  |    2 +-
 drivers/net/wireless/rt2x00/rt2500pci.c  |    2 +-
 drivers/net/wireless/rt2x00/rt2500usb.c  |    2 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c  |   11 ++++++++++-
 drivers/net/wireless/rt2x00/rt2x00ring.h |    1 +
 drivers/net/wireless/rt2x00/rt61pci.c    |    2 +-
 drivers/net/wireless/rt2x00/rt73usb.c    |    2 +-
 7 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c 
b/drivers/net/wireless/rt2x00/rt2400pci.c
index 8889f6d..d48b6ca 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1072,7 +1072,7 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev 
*rt2x00dev,
        rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
                           test_bit(ENTRY_TXD_MORE_FRAG, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_ACK,
-                          !(control->flags & IEEE80211_TXCTL_NO_ACK));
+                          test_bit(ENTRY_TXD_ACK, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
                           test_bit(ENTRY_TXD_REQ_TIMESTAMP, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_RTS,
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c 
b/drivers/net/wireless/rt2x00/rt2500pci.c
index 1dea9d8..e6a0c37 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1203,7 +1203,7 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev 
*rt2x00dev,
        rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
                           test_bit(ENTRY_TXD_MORE_FRAG, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_ACK,
-                          !(control->flags & IEEE80211_TXCTL_NO_ACK));
+                          test_bit(ENTRY_TXD_ACK, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
                           test_bit(ENTRY_TXD_REQ_TIMESTAMP, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_OFDM,
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c 
b/drivers/net/wireless/rt2x00/rt2500usb.c
index a00420e..e9f99c4 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1058,7 +1058,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev 
*rt2x00dev,
        rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
                           test_bit(ENTRY_TXD_MORE_FRAG, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_ACK,
-                          !(control->flags & IEEE80211_TXCTL_NO_ACK));
+                          test_bit(ENTRY_TXD_ACK, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
                           test_bit(ENTRY_TXD_REQ_TIMESTAMP, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_OFDM,
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c 
b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 304830b..3ab1fb9 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -629,12 +629,21 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
        tx_rate = control->tx_rate;
 
        /*
+        * Check whether this frame is to be acked
+        */
+       if (!(control->flags & IEEE80211_TXCTL_NO_ACK))
+               __set_bit(ENTRY_TXD_ACK, &desc.flags);
+
+       /*
         * Check if this is a RTS/CTS frame
         */
        if (is_rts_frame(frame_control) || is_cts_frame(frame_control)) {
                __set_bit(ENTRY_TXD_BURST, &desc.flags);
-               if (is_rts_frame(frame_control))
+               if (is_rts_frame(frame_control)) {
                        __set_bit(ENTRY_TXD_RTS_FRAME, &desc.flags);
+                       __set_bit(ENTRY_TXD_ACK, &desc.flags);
+               } else
+                       __clear_bit(ENTRY_TXD_ACK, &desc.flags);
                if (control->rts_cts_rate)
                        tx_rate = control->rts_cts_rate;
        }
diff --git a/drivers/net/wireless/rt2x00/rt2x00ring.h 
b/drivers/net/wireless/rt2x00/rt2x00ring.h
index ee6c423..5b871ad 100644
--- a/drivers/net/wireless/rt2x00/rt2x00ring.h
+++ b/drivers/net/wireless/rt2x00/rt2x00ring.h
@@ -52,6 +52,7 @@ struct txdata_entry_desc {
 #define ENTRY_TXD_MORE_FRAG    4
 #define ENTRY_TXD_REQ_TIMESTAMP        5
 #define ENTRY_TXD_BURST                6
+#define ENTRY_TXD_ACK          7
 
 /*
  * Queue ID. ID's 0-4 are data TX rings
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c 
b/drivers/net/wireless/rt2x00/rt61pci.c
index f3c4cbe..606cf12 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -1578,7 +1578,7 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev 
*rt2x00dev,
        rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
                           test_bit(ENTRY_TXD_MORE_FRAG, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_ACK,
-                          !(control->flags & IEEE80211_TXCTL_NO_ACK));
+                          test_bit(ENTRY_TXD_ACK, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
                           test_bit(ENTRY_TXD_REQ_TIMESTAMP, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_OFDM,
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c 
b/drivers/net/wireless/rt2x00/rt73usb.c
index 7caa363..4d1227a 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1275,7 +1275,7 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev 
*rt2x00dev,
        rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
                           test_bit(ENTRY_TXD_MORE_FRAG, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_ACK,
-                          !(control->flags & IEEE80211_TXCTL_NO_ACK));
+                          test_bit(ENTRY_TXD_ACK, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
                           test_bit(ENTRY_TXD_REQ_TIMESTAMP, &desc->flags));
        rt2x00_set_field32(&word, TXD_W0_OFDM,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to