Search Linux Wireless

Re: [PATCH 11/13] rt2x00: Fix crash on USB unplug

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

 



Ivo,

A minor nit:

On Fri, Nov 5, 2010 at 06:41, Ivo van Doorn <ivdoorn@xxxxxxxxx> wrote:
> By not scheduling the TX/RX completion worker threads
> when Radio is disabled, or hardware has been unplugged,
> the queues cannot be completely cleaned.
>
> This causes crashes when the hardware has been unplugged while
> the radio is still enabled.
>
> Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>
> Acked-by: Gertjan van Wingerde <gwingerde@xxxxxxxxx>
> ---
> diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
> index a5c7a4f..b6822cd 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
> @@ -483,6 +483,10 @@ void rt2x00lib_rxdone(struct queue_entry *entry)
>        unsigned int header_length;
>        int rate_idx;
>
> +       if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) ||
> +           !test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
> +               goto submit_entry;
> +
>        if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags))
>                goto submit_entry;
>

Could these two if statements be combined?

Thanks,

-- 
Julian Calaby

Email: julian.calaby@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux