dect
/
linux-2.6
Archived
13
0
Fork 0

rt2x00: Fix txdone_entry_desc_flags

txdone_entry_desc_flags is used with __set_bit and test_bit which
bit-shift the values, so don't bit-shift the flags in the enum.
Also make sure flags are initialized before being used.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Jochen Friedrich 2008-08-15 14:47:46 +02:00 committed by John W. Linville
parent 430cd47fa9
commit f126cba427
2 changed files with 5 additions and 4 deletions

View File

@ -173,10 +173,10 @@ struct rxdone_entry_desc {
* frame transmission failed due to excessive retries.
*/
enum txdone_entry_desc_flags {
TXDONE_UNKNOWN = 1 << 0,
TXDONE_SUCCESS = 1 << 1,
TXDONE_FAILURE = 1 << 2,
TXDONE_EXCESSIVE_RETRY = 1 << 3,
TXDONE_UNKNOWN,
TXDONE_SUCCESS,
TXDONE_FAILURE,
TXDONE_EXCESSIVE_RETRY,
};
/**

View File

@ -181,6 +181,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
* (Only indirectly by looking at the failed TX counters
* in the register).
*/
txdesc.flags = 0;
if (!urb->status)
__set_bit(TXDONE_UNKNOWN, &txdesc.flags);
else