[rt2x00-users] [RFC/RFT] rt2x00: use rt2800_config_channel_rt3x for rt2872

Antonio Quartulli ordex at ritirata.org
Thu Apr 15 09:12:08 UTC 2010


On gio, apr 15, 2010 at 02:52:14 +0200, Alban Browaeys wrote:
> Does this happens at first load ? If not this patch may fix this (Coudl 
> you try it nevertheless ?). Also mind that if you loaded the legacy 
> driver before the rt2800pci one you will not have any interrupts.
> What make me not confident is that I  have only tested my tree against 
> 2.6.34-rc3 wireless-testing and also without
> helmut patches (but a tester reported that merging both gives him a 
> working driver. I and other tester had a
> working driver too even without the fix ... I bet this had to do with 
> the txwi behing not modified or such in
> between the writes thus the issue was hidden. Thanks  helmut for fixing 
> this one).
> 

The firmware loading error appear even at first load (the legacy module
is blacklisted).

Anyway I'm actually using your branch (prahal/rtt3070v2-next-debug) on
which I applied Helmut patch, so I already have the register reset patch, but
rt2800pci doesn't work if I load it after rmmoding the legacy driver.

Regards

> 
> 
> Patch :
> 
> From: Alban Browaeys<prahal at yahoo.com>
> Date: Sat, 28 Nov 2009 11:21:15 +0000 (+0100)
> Subject: rt2x00: registers reset (PCI only)
> X-Git-Url: http://git.prahal.homelinux.net/?p=rt2x00.git;a=commitdiff_plain;h=b0690e29ab78ddb79d3f793e89775e58d864206a
> 
> rt2x00: registers reset (PCI only)
> ---
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 18d4d8e..2b86fd8 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -1424,6 +1424,11 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
>   	rt2800_register_read(rt2x00dev, TX_STA_CNT1,&reg);
>   	rt2800_register_read(rt2x00dev, TX_STA_CNT2,&reg);
> 
> +	if (rt2x00_intf_is_pci(rt2x00dev)) {
> +		rt2800_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0);
> +		rt2800_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
> +	}
> +
>   	return 0;
>   }
>   EXPORT_SYMBOL_GPL(rt2800_init_registers);
> diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
> index 316beb0..100b59e 100644
> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> @@ -458,6 +458,19 @@ static int rt2800pci_enable_radio(struct rt2x00_dev *rt2x00dev)
>   	u32 reg;
>   	u16 word;
> 
> +	rt2800_register_read(rt2x00dev, WPDMA_RST_IDX,&reg);
> +	rt2x00_set_field32(&reg, WPDMA_RST_IDX_DTX_IDX0, 1);
> +	rt2x00_set_field32(&reg, WPDMA_RST_IDX_DTX_IDX1, 1);
> +	rt2x00_set_field32(&reg, WPDMA_RST_IDX_DTX_IDX2, 1);
> +	rt2x00_set_field32(&reg, WPDMA_RST_IDX_DTX_IDX3, 1);
> +	rt2x00_set_field32(&reg, WPDMA_RST_IDX_DTX_IDX4, 1);
> +	rt2x00_set_field32(&reg, WPDMA_RST_IDX_DTX_IDX5, 1);
> +	rt2x00_set_field32(&reg, WPDMA_RST_IDX_DRX_IDX0, 1);
> +	rt2800_register_write(rt2x00dev, WPDMA_RST_IDX, reg);
> +
> +	rt2800_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000e1f);
> +	rt2800_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000e00);
> +
>   	/*
>   	 * Initialize all registers.
>   	 */

-- 
Antonio Quartulli

Ognuno di noi, da solo, non vale nulla 
Ernesto "Che" Guevara



More information about the users mailing list