static void rt2400pci_enable_interrupt(struct rt2x00_dev *rt2x00dev,
struct rt2x00_field32 irq_field)
{
- unsigned long flags;
u32 reg;
/*
* Enable a single interrupt. The interrupt mask register
* access needs locking.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock_irq(&rt2x00dev->irqmask_lock);
rt2x00pci_register_read(rt2x00dev, CSR8, ®);
rt2x00_set_field32(®, irq_field, 0);
rt2x00pci_register_write(rt2x00dev, CSR8, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock_irq(&rt2x00dev->irqmask_lock);
}
static void rt2400pci_txstatus_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
u32 reg;
- unsigned long flags;
/*
* Handle all tx queues.
/*
* Enable all TXDONE interrupts again.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock_irq(&rt2x00dev->irqmask_lock);
rt2x00pci_register_read(rt2x00dev, CSR8, ®);
rt2x00_set_field32(®, CSR8_TXDONE_TXRING, 0);
rt2x00_set_field32(®, CSR8_TXDONE_PRIORING, 0);
rt2x00pci_register_write(rt2x00dev, CSR8, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock_irq(&rt2x00dev->irqmask_lock);
}
static void rt2400pci_tbtt_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = dev_instance;
u32 reg, mask;
- unsigned long flags;
/*
* Get the interrupt sources & saved to local variable.
* Disable all interrupts for which a tasklet was scheduled right now,
* the tasklet will reenable the appropriate interrupts.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock(&rt2x00dev->irqmask_lock);
rt2x00pci_register_read(rt2x00dev, CSR8, ®);
reg |= mask;
rt2x00pci_register_write(rt2x00dev, CSR8, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock(&rt2x00dev->irqmask_lock);
static void rt2500pci_enable_interrupt(struct rt2x00_dev *rt2x00dev,
struct rt2x00_field32 irq_field)
{
- unsigned long flags;
u32 reg;
/*
* Enable a single interrupt. The interrupt mask register
* access needs locking.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock_irq(&rt2x00dev->irqmask_lock);
rt2x00pci_register_read(rt2x00dev, CSR8, ®);
rt2x00_set_field32(®, irq_field, 0);
rt2x00pci_register_write(rt2x00dev, CSR8, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock_irq(&rt2x00dev->irqmask_lock);
}
static void rt2500pci_txstatus_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
u32 reg;
- unsigned long flags;
/*
* Handle all tx queues.
/*
* Enable all TXDONE interrupts again.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock_irq(&rt2x00dev->irqmask_lock);
rt2x00pci_register_read(rt2x00dev, CSR8, ®);
rt2x00_set_field32(®, CSR8_TXDONE_TXRING, 0);
rt2x00_set_field32(®, CSR8_TXDONE_PRIORING, 0);
rt2x00pci_register_write(rt2x00dev, CSR8, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock_irq(&rt2x00dev->irqmask_lock);
}
static void rt2500pci_tbtt_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = dev_instance;
u32 reg, mask;
- unsigned long flags;
/*
* Get the interrupt sources & saved to local variable.
* Disable all interrupts for which a tasklet was scheduled right now,
* the tasklet will reenable the appropriate interrupts.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock(&rt2x00dev->irqmask_lock);
rt2x00pci_register_read(rt2x00dev, CSR8, ®);
reg |= mask;
rt2x00pci_register_write(rt2x00dev, CSR8, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock(&rt2x00dev->irqmask_lock);
return IRQ_HANDLED;
}
static void rt2800pci_enable_interrupt(struct rt2x00_dev *rt2x00dev,
struct rt2x00_field32 irq_field)
{
- unsigned long flags;
u32 reg;
/*
* Enable a single interrupt. The interrupt mask register
* access needs locking.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock_irq(&rt2x00dev->irqmask_lock);
rt2800_register_read(rt2x00dev, INT_MASK_CSR, ®);
rt2x00_set_field32(®, irq_field, 1);
rt2800_register_write(rt2x00dev, INT_MASK_CSR, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock_irq(&rt2x00dev->irqmask_lock);
}
static void rt2800pci_txstatus_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = dev_instance;
u32 reg, mask;
- unsigned long flags;
/* Read status and ACK all interrupts */
rt2800_register_read(rt2x00dev, INT_SOURCE_CSR, ®);
* Disable all interrupts for which a tasklet was scheduled right now,
* the tasklet will reenable the appropriate interrupts.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock(&rt2x00dev->irqmask_lock);
rt2800_register_read(rt2x00dev, INT_MASK_CSR, ®);
reg &= mask;
rt2800_register_write(rt2x00dev, INT_MASK_CSR, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock(&rt2x00dev->irqmask_lock);
return IRQ_HANDLED;
}
static void rt61pci_enable_interrupt(struct rt2x00_dev *rt2x00dev,
struct rt2x00_field32 irq_field)
{
- unsigned long flags;
u32 reg;
/*
* Enable a single interrupt. The interrupt mask register
* access needs locking.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock_irq(&rt2x00dev->irqmask_lock);
rt2x00pci_register_read(rt2x00dev, INT_MASK_CSR, ®);
rt2x00_set_field32(®, irq_field, 0);
rt2x00pci_register_write(rt2x00dev, INT_MASK_CSR, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock_irq(&rt2x00dev->irqmask_lock);
}
static void rt61pci_enable_mcu_interrupt(struct rt2x00_dev *rt2x00dev,
struct rt2x00_field32 irq_field)
{
- unsigned long flags;
u32 reg;
/*
* Enable a single MCU interrupt. The interrupt mask register
* access needs locking.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock_irq(&rt2x00dev->irqmask_lock);
rt2x00pci_register_read(rt2x00dev, MCU_INT_MASK_CSR, ®);
rt2x00_set_field32(®, irq_field, 0);
rt2x00pci_register_write(rt2x00dev, MCU_INT_MASK_CSR, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock_irq(&rt2x00dev->irqmask_lock);
}
static void rt61pci_txstatus_tasklet(unsigned long data)
struct rt2x00_dev *rt2x00dev = dev_instance;
u32 reg_mcu, mask_mcu;
u32 reg, mask;
- unsigned long flags;
/*
* Get the interrupt sources & saved to local variable.
* Disable all interrupts for which a tasklet was scheduled right now,
* the tasklet will reenable the appropriate interrupts.
*/
- spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
+ spin_lock(&rt2x00dev->irqmask_lock);
rt2x00pci_register_read(rt2x00dev, INT_MASK_CSR, ®);
reg |= mask;
reg |= mask_mcu;
rt2x00pci_register_write(rt2x00dev, MCU_INT_MASK_CSR, reg);
- spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
+ spin_unlock(&rt2x00dev->irqmask_lock);
return IRQ_HANDLED;
}