Search Linux Wireless

Re: [v2 07/11] rsi: Add usb multi-byte read operation

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

 



Amitkumar Karwar <amitkarwar@xxxxxxxxx> writes:

> From: Prameela Rani Garnepudi <prameela.j04cs@xxxxxxxxx>
>
> USB multibyte read will be used in the new firmware loading method
> for RS9113 chipset.
>
> Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@xxxxxxxxx>
> Signed-off-by: Amitkumar Karwar <amit.karwar@xxxxxxxxxxxxxxxxxx>

[...]

> +static int rsi_usb_read_register_multiple(struct rsi_hw *adapter, u32 addr,
> +					  u8 *data, u16 count)
> +{
> +	struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev;
> +	u8 *buf;
> +	u16 transfer;
> +	int status;
> +
> +	if (!addr)
> +		return -EINVAL;
> +
> +	buf = kzalloc(4096, GFP_KERNEL);
> +	if (!buf)
> +		return -ENOMEM;
> +
> +	while (count) {
> +		transfer = min_t(u16, count, 4096);

A minor thing, no need to resend just because of this. But a define for
4096 would be nice.

-- 
Kalle Valo



[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