Search Linux Wireless

Re: [PATCH] rt2x00: rt2800usb: fix status register reread logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/19/12 15:59, Stanislaw Gruszka wrote:
> Another good catch from Jakub Kicinski. This patch fixes my
> recent commit: ed61e2b02027935520d1be884fac0b2ffce8379a
> "rt2x00: rt2800usb: rework txdone code"
> 
> We should reread status register only when nobody else start already
> reading status i.e. test_and_set_bit(TX_STATUS_READING, flags) return 0.
> 
> Reported-by: Jakub Kicinski <moorray@xxxxx>
> Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>

Acked-by: Gertjan van Wingerde <gwingerde@xxxxxxxxx>

> ---
>  drivers/net/wireless/rt2x00/rt2800usb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index f97f846..001735f 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -184,7 +184,7 @@ stop_reading:
>  	 * here again if status reading is needed.
>  	 */
>  	if (rt2800usb_txstatus_pending(rt2x00dev) &&
> -	    test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags))
> +	    !test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags))
>  		return true;
>  	else
>  		return false;


-- 
---
Gertjan
--
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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux