[rt2x00-users] [RFC 1/9] rt2x00: use an irqmask to simplify irq toggling

Helmut Schaa helmut.schaa at googlemail.com
Tue Jul 6 04:13:52 AEST 2010


Am Montag 05 Juli 2010 schrieb Helmut Schaa:
> Am Montag 05 Juli 2010 schrieb Ivo Van Doorn:
> > On Mon, Jul 5, 2010 at 6:19 PM, Helmut Schaa
> > <helmut.schaa at googlemail.com> wrote:
> > > Use an irqmask to simplify irq toggling. Will be used in a subsequent patch.
> > >
> > > Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
> > > ---
> > >  drivers/net/wireless/rt2x00/rt2400pci.c |   22 +++++++++---
> > >  drivers/net/wireless/rt2x00/rt2500pci.c |   22 +++++++++---
> > >  drivers/net/wireless/rt2x00/rt2800pci.c |   53 ++++++++++++++++++++-----------
> > >  drivers/net/wireless/rt2x00/rt2x00.h    |    5 +++
> > >  drivers/net/wireless/rt2x00/rt61pci.c   |   41 +++++++++++++++++-------
> > >  5 files changed, 100 insertions(+), 43 deletions(-)
> > >
> > > diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
> > > index 3bedf56..b627fdc 100644
> > > --- a/drivers/net/wireless/rt2x00/rt2400pci.c
> > > +++ b/drivers/net/wireless/rt2x00/rt2400pci.c
> > > @@ -877,7 +877,6 @@ static void rt2400pci_toggle_rx(struct rt2x00_dev *rt2x00dev,
> > >  static void rt2400pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
> > >                                 enum dev_state state)
> > >  {
> > > -       int mask = (state == STATE_RADIO_IRQ_OFF);
> > >        u32 reg;
> > >
> > >        /*
> > > @@ -894,11 +893,10 @@ static void rt2400pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
> > >         * Non-checked interrupt bits are disabled by default.
> > >         */
> > >        rt2x00pci_register_read(rt2x00dev, CSR8, &reg);
> > > -       rt2x00_set_field32(&reg, CSR8_TBCN_EXPIRE, mask);
> > > -       rt2x00_set_field32(&reg, CSR8_TXDONE_TXRING, mask);
> > > -       rt2x00_set_field32(&reg, CSR8_TXDONE_ATIMRING, mask);
> > > -       rt2x00_set_field32(&reg, CSR8_TXDONE_PRIORING, mask);
> > > -       rt2x00_set_field32(&reg, CSR8_RXDONE, mask);
> > > +       if (state == STATE_RADIO_IRQ_OFF)
> > > +               reg |= rt2x00dev->irqmask[0];
> > > +       else
> > > +               reg &= ~rt2x00dev->irqmaskmut[0];
> > >        rt2x00pci_register_write(rt2x00dev, CSR8, reg);
> > >  }
> > 
> > This patch will not compile due to the missing
> > addition of irqmask to struct rt2x00_dev.
> 
> Heh, it was in there, for sure ;)
> 
> Hel

Urghs, I cannot even write my name anymore :)




More information about the users mailing list