Search Linux Wireless

Re: [PATCH 4/7] rt2x00: rt2800usb: use rt2x00dev->rx->limit

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

 



On Wed, May 1, 2013 at 5:17 PM, Gabor Juhos <juhosg@xxxxxxxxxxx> wrote:
> The RX data queue is initialized already when
> the rt2800_usb_enable_radio() function is called.
>
> Fetch the number of the queue entries from that
> instead of using the entry_num field of the data
> queue descriptor.
>
> The two values are the same, and the use of the
> rt2x00dev->rx->limit value allows us to get rid
> of a superfluous pointer dereference.
>
> Signed-off-by: Gabor Juhos <juhosg@xxxxxxxxxxx>

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

> ---
>  drivers/net/wireless/rt2x00/rt2800usb.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index ac854d7..c71a48d 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -327,7 +327,7 @@ static int rt2800usb_enable_radio(struct rt2x00_dev *rt2x00dev)
>          * this limit so reduce the number to prevent errors.
>          */
>         rt2x00_set_field32(&reg, USB_DMA_CFG_RX_BULK_AGG_LIMIT,
> -                          ((rt2x00dev->ops->rx->entry_num * DATA_FRAME_SIZE)
> +                          ((rt2x00dev->rx->limit * DATA_FRAME_SIZE)
>                             / 1024) - 3);
>         rt2x00_set_field32(&reg, USB_DMA_CFG_RX_BULK_EN, 1);
>         rt2x00_set_field32(&reg, USB_DMA_CFG_TX_BULK_EN, 1);
> --
> 1.7.10
>
> --
> 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



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