[rt2x00-users] [PATCH] rt2x00: fix beacon reset on rt2800
Helmut Schaa
helmut.schaa at googlemail.com
Tue Jun 22 08:35:27 UTC 2010
Am Dienstag 22 Juni 2010 schrieb Ivo Van Doorn:
> On Tue, Jun 22, 2010 at 10:14 AM, Helmut Schaa
> <helmut.schaa at googlemail.com> wrote:
> > 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.
> > */
>
> Hmm off course, rt2800 doesn't have a owner and valid field. :S
>
> > 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);
>
> I think doing rt2800_register_multiwrite would be easier/faster. :)
Yes, but we would have to pass a 16byte long buffer to it. That's why I used
the loop. Or did I miss anything?
Helmut
More information about the users
mailing list