On Friday 08 August 2008, Jochen Friedrich wrote: > 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. Good catch, Applied to rt2x00.git Thanks, Ivo > Signed-off-by: Jochen Friedrich <jochen@xxxxxxxx> > --- > drivers/net/wireless/rt2x00/rt2x00queue.h | 8 ++++---- > drivers/net/wireless/rt2x00/rt2x00usb.c | 1 + > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h > index 01a6567..37f3f98 100644 > --- a/drivers/net/wireless/rt2x00/rt2x00queue.h > +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h > @@ -191,10 +191,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, > }; > > /** > diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c > index 8d76bb2..2050227 100644 > --- a/drivers/net/wireless/rt2x00/rt2x00usb.c > +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c > @@ -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 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html