[rt2x00-users] [PATCH] rt2x00: fix beacon reset on rt2800

Helmut Schaa helmut.schaa at googlemail.com
Wed Jun 23 07:07:58 UTC 2010


Ivo, please drop this patch. I'll resend it soon.

Am Dienstag 22 Juni 2010 schrieb Helmut Schaa:
> When an interface is removed the according beacon entry should be reset.
> The current approach to only clear the first word is not enough to stop
> the device from sending out the beacon, hence resulting in beacons being
> sent out for already removed interfaces.
> 
> Fix this by invalidating the entire TXWI in front of the beacon instead
> of only the first word.
> 
> Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
> ---
>  drivers/net/wireless/rt2x00/rt2800lib.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index f25997e..d53f680 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -735,16 +735,18 @@ void rt2800_config_intf(struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf,
>  {
>  	unsigned int beacon_base;
>  	u32 reg;
> +	int i;
>  
>  	if (flags & CONFIG_UPDATE_TYPE) {
>  		/*
>  		 * Clear current synchronisation setup.
>  		 * For the Beacon base registers we only need to clear
> -		 * the first byte since that byte contains the VALID and OWNER
> -		 * bits which (when set to 0) will invalidate the entire beacon.
> +		 * the whole TXWI which (when set to 0) will invalidate
> +		 * the entire beacon.
>  		 */
>  		beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx);
> -		rt2800_register_write(rt2x00dev, beacon_base, 0);
> +		for (i = 0; i < TXWI_DESC_SIZE; i += sizeof(__le32))
> +			rt2800_register_write(rt2x00dev, beacon_base + i, 0);
>  
>  		/*
>  		 * Enable synchronisation.
> 




More information about the users mailing list