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

Ivo Van Doorn ivdoorn at gmail.com
Tue Jul 6 04:21:58 AEST 2010


On Mon, Jul 5, 2010 at 8:13 PM, Helmut Schaa
<helmut.schaa at googlemail.com> wrote:
> 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 ;)

I believe so, but I think you did git add rt2x00.h for patch 2 instead
of patch 1 ;)

Ivo




More information about the users mailing list