Search Linux Wireless

Re: [PATCH] rt2x00 : RT3290 chip support v1

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

 



Hi Woody

On Mon, May 21, 2012 at 04:01:47PM +0800, Woody Hung wrote:
> +	if (rt2x00dev->chip.rf == RF3290 ||
> +		rt2x00dev->chip.rf == RF5370 ||
> +		rt2x00dev->chip.rf == RF5372 ||
> +		rt2x00dev->chip.rf == RF5390) {

Please fix indention of "if" statement arguments by n*tab + m*spaces,
where m is less than 8, and use rt2x00_rf function i.e:

	if (rt2x00_rf(rt2x00dev, RF3290) ||
	    rt2x00_rf(rt2x00dev, RF5380) ||

>  	if (rt2x00_rt(rt2x00dev, RT3071) ||
>  	    rt2x00_rt(rt2x00dev, RT3090) ||
> -	    rt2x00_rt(rt2x00dev, RT3390)) {
> -		rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000400);
> +	    rt2x00_rt(rt2x00dev, RT3390) ||
> +		rt2x00_rt(rt2x00dev, RT3290)) {
[snip]
> -	if (rt2x00_rt(rt2x00dev, RT5390) ||
> +	if (rt2x00_rt(rt2x00dev, RT3290) ||
> +		rt2x00_rt(rt2x00dev, RT5390) ||
>  		rt2x00_rt(rt2x00dev, RT5392)) {
Again "if" indention, please fix that on any place in the patch
where bottom "if" argument is unaligned to upper "if" argument.

> +EXPORT_SYMBOL_GPL(rt2800_enable_wlan_rt3290);
Why not define this function in file where it is used.

>  	struct rt2x00_dev *rt2x00dev;
>  	int retval;
> +	u16 device_id;
>  
>  	retval = pci_enable_device(pci_dev);
>  	if (retval) {
> @@ -305,6 +306,14 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
>  	if (retval)
>  		goto exit_free_device;
>  
> +	/*
> +	 * Because rt3290 chip use different efuse offset to read efuse data.
> +	 * So before read efuse it need one parameter to indicate it is the
> +	 * rt3290 or not.
> +	 */
> +	pci_read_config_word(pci_dev, PCI_DEVICE_ID, &device_id);
> +	rt2x00dev->chip.device_id = device_id;
Not needed, the same data is available in:

to_pci_dev(rt2x00dev->dev)->device

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