rt2x00: only set TXDONE_FALLBACK in rt2800pci if the frame was retried
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 14 Jun 2010 20:09:41 +0000 (22:09 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 15 Jun 2010 20:00:49 +0000 (16:00 -0400)
TXDONE_FALLBACK expresses that fallback rates were used for retries. Hence,
it only makes sense to set the flag if retries > 0.

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/rt2800pci.c

index b5a871eb888118386c86a568de5e7fb8915a964d..eeecedb63cd0f67d16a65e53c5edf936f974c77a 100644 (file)
@@ -903,8 +903,12 @@ static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev)
                        txdesc.retry = 7;
                }
 
-               __set_bit(TXDONE_FALLBACK, &txdesc.flags);
-
+               /*
+                * the frame was retried at least once
+                * -> hw used fallback rates
+                */
+               if (txdesc.retry)
+                       __set_bit(TXDONE_FALLBACK, &txdesc.flags);
 
                rt2x00pci_txdone(entry, &txdesc);
        }